ConnectTool
 All Classes Namespaces Files Functions Variables Pages
Classes | Functions
module_toolbox_num Namespace Reference

Classes

class  ToolboxNumError
 

Functions

def row_beg2end
 
def col_beg2end
 
def vec_beg2end
 
def is_sortable
 
def nearest
 
def encadre
 
def interpolation1D
 
def interpolate
 
def gridpos
 
def polint
 
def cell2grid
 
def grid2cell
 
def gaussian
 Gaussian function. More...
 
def fit_gaussian
 Fit data with a gaussian. More...
 
def fit_gaussian_latitude
 Fit latitudes with a gaussian. More...
 
def fit_gaussian_longitude
 Fit longitudes with a gaussian. More...
 

Function Documentation

def module_toolbox_num.cell2grid (   cells)
From a cell centered coordinate axis (c_i)_{i in [0,N-1]},
compute the grid points coordinates (g_i)_{i in [0,N]}:
g_{i+1} = \frac{c_{i} + c_{i+1}}{2} for all i in [0,N-2]
g_{0} = 2*c_{0}   - g_{1}
g_{N} = 2*c_{N-1} - g_{N-1}

Here is the caller graph for this function:

def module_toolbox_num.col_beg2end (   j0,
  input_mat 
)
For a matrix, put the columns from 0 to j0-1 (include) at the end
and translate every other columns.
def module_toolbox_num.encadre (   items,
  pivot 
)
In a list of object with order relation, find nearest items from pivot.
For a given list (a_i)_{i=1..N} and a given pivot x, return:
[a_{i0}, a{j0}] such that 
a_{i0} is the nearest item from x
a{j0} the element just after x if a_{i0} < x or just before x if a_{i0} > x

Here is the call graph for this function:

def module_toolbox_num.fit_gaussian (   xbins,
  ydata 
)

Fit data with a gaussian.

Does not fit the data directly, but the number of point present in some given bins.

Parameters
[in]xbins,:bins of x axis. Lenght M
[in]ydata,:data. Length N (at least 100)
[out]a,:amplitude of the fitted distribution
[out]mean,:mean of the fitted distribution
[out]sigma,:standard deviation of the fitted distribution
[out]perr,:np.array(3). Sqrt(variance) for each parameter

Here is the call graph for this function:

Here is the caller graph for this function:

def module_toolbox_num.fit_gaussian_latitude (   latitudes,
  bin_width = 1. 
)

Fit latitudes with a gaussian.

Parameters
[in]latitudes,:np.array
[out]a,mean,sigma,perr

Here is the call graph for this function:

def module_toolbox_num.fit_gaussian_longitude (   longitudes,
  bin_width = 1. 
)

Fit longitudes with a gaussian.

Parameters
[in]longitudes,:np.array
[out]a,mean,sigma,perr

Here is the call graph for this function:

def module_toolbox_num.gaussian (   x,
  a,
  mean,
  sigma 
)

Gaussian function.

Parameters
[in]x,:np.array for x values
[in]a,:amplitude
[in]mean,:mean
[in]sigma,:standard deviation
[out]gaussianas np.array
def module_toolbox_num.grid2cell (   grids)
From a grid centered coordinate axis (g_i)_{i in [0,N]},
compute the cell points coordinates (c_i)_{i in [0,N-1]}:
c_{i} = \frac{g_{i} + g_{i+1}}{2} for all i in [0,N-1]

Here is the caller graph for this function:

def module_toolbox_num.gridpos (   x,
  x0 
)
 

Here is the caller graph for this function:

def module_toolbox_num.interpolate (   x,
  y,
  f,
  nptx,
  npty,
  x0,
  y0 
)
 

Here is the call graph for this function:

def module_toolbox_num.interpolation1D (   x,
  y,
  x0,
  kind = 'linear' 
)

Here is the call graph for this function:

def module_toolbox_num.is_sortable (   obj)
Check if an object has an order relation in Python 2.X or 3.X

Here is the caller graph for this function:

def module_toolbox_num.nearest (   items,
  pivot 
)
In a list of object with order relation, find the nearest item from pivot.

Here is the caller graph for this function:

def module_toolbox_num.polint (   xa,
  ya,
  x 
)
 

Here is the caller graph for this function:

def module_toolbox_num.row_beg2end (   i0,
  input_mat 
)
For a matrix, put the row from 0 to i0-1 (include) at the end
and translate every other rows.
def module_toolbox_num.vec_beg2end (   i0,
  input_vec 
)
For a vector, put the first i0 at the end
and translate every other.