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... | |
| 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}

| 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

| 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.
| [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 |


| def module_toolbox_num.fit_gaussian_latitude | ( | latitudes, | |
bin_width = 1. |
|||
| ) |
Fit latitudes with a gaussian.
| [in] | latitudes,: | np.array |
| [out] | a,mean,sigma,perr |

| def module_toolbox_num.fit_gaussian_longitude | ( | longitudes, | |
bin_width = 1. |
|||
| ) |
Fit longitudes with a gaussian.
| [in] | longitudes,: | np.array |
| [out] | a,mean,sigma,perr |

| def module_toolbox_num.gaussian | ( | x, | |
| a, | |||
| mean, | |||
| sigma | |||
| ) |
Gaussian function.
| [in] | x,: | np.array for x values |
| [in] | a,: | amplitude |
| [in] | mean,: | mean |
| [in] | sigma,: | standard deviation |
| [out] | gaussian | as 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]

| def module_toolbox_num.gridpos | ( | x, | |
| x0 | |||
| ) |

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

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

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

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

| def module_toolbox_num.polint | ( | xa, | |
| ya, | |||
| x | |||
| ) |

| 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.
1.8.5