| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.7 Change data
These functions change the data in some direction like differentiations, integrations and so on. The direction in which the change will applied is specified by the string parameter, which may contain ‘x’, ‘y’ or ‘z’ characters for 1-st, 2-nd and 3-d dimension correspondengly.
- Method on
mglData(C++, Python):voidCumSum (const char *dir) - C function:
voidmgl_data_cumsum (HMDTdat,const char *dir) Cumulative summation of the data in given direction or directions.
- Method on
mglData(C++, Python):voidIntegral (const char *dir) - C function:
voidmgl_data_integral (HMDTdat,const char *dir) Integrates (like cumulative summation) the data in given direction or directions.
- Метод класса
mglData(C++, Python):voidDiff (const char *dir) - Функция С:
voidmgl_data_diff (HMDTdat,const char *dir) Differentiates the data in given direction or directions.
- Метод класса
mglData(C++, Python):voidDiff (const mglData &x,const mglData &y) - Метод класса
mglData(C++, Python):voidDiff (const mglData &x,const mglData &y,const mglData &z) - Функция С:
voidmgl_data_diff_par (HMDTdat,const HMDTx,const HMDTy,const HMDTz) Differentiates the data specified parametrically in direction x with y, z=constant. Parametrical differentiation uses the formula (for 2D case): da/dx = (a_j*y_i-a_i*y_j)/(x_j*y_i-x_i*y_j) where a_i=da/di, a_j=da/dj denotes usual differentiation along 1st and 2nd dimensions. The similar formula is used for 3D case. Note, that you may change the order of arguments – for example, if you have 2D data a(i,j) which depend on coordinates {x(i,j), y(i,j)} then usual derivative along ‘x’ will be
Diff(x,y);and usual derivative along ‘y’ will beDiff(y,x);.
- Метод класса
mglData(C++, Python):voidDiff2 (const char *dir) - Функция С:
voidmgl_data_diff2 (const char *dir) Double-differentiates (like Laplace operator) the data in given direction.
- Метод класса
mglData(C++, Python):voidSinFFT (const char *dir) - Функция С:
voidmgl_data_sinfft (HMDTdat,const char *dir) Do Sine transform of the data in given direction or directions. The Sine transform is \sum a_i \sin(k i).
- Метод класса
mglData(C++, Python):voidCosFFT (const char *dir) - Функция С:
voidmgl_data_cosfft (HMDTdat,const char *dir) Do Cosine transform of the data in given direction or directions. The Cosine transform is \sum a_i \cos(k i).
- Метод класса
mglData(C++, Python):voidHankel (const char *dir) - Функция С:
voidmgl_data_hankel (HMDTdat,const char *dir) Do Hankel transform of the data in given direction or directions. The Hankel transform is \sum a_i J_0(k i).
- Метод класса
mglData(C++, Python):voidSwap (const char *dir) - Функция С:
voidmgl_data_swap (HMDTdat,const char *dir) Swaps the left and right part of the data in given direction (useful for Fourier spectrum).
- Метод класса
mglData(C++, Python):voidRoll (chardir,num) - Функция С:
voidmgl_data_roll (HMDTdat,chardir,num) Rolls the data along direction dir. Resulting array will be out[i] = ini[(i+num)%nx] if
dir='x'.
- Метод класса
mglData(C++, Python):voidMirror (const char *dir) - Функция С:
voidmgl_data_mirror (HMDTdat,const char *dir) Mirror the left-to-right part of the data in given direction. Looks like change the value index i->n-i.
- Метод класса
mglData(C++, Python):voidSew (const char *dir,floatda=2*M_PI) - Функция С:
voidmgl_data_sew (HMDTdat,const char *dir,floatda) Remove value steps (like phase jumps after inverse trigonometric functions) with period da in given direction.
- Метод класса
mglData(C++, Python):voidSmooth (intType,const char *dir,floatdelta=0) - Функция С:
voidmgl_data_smooth (HMDTdat,intType,floatdelt,const char *dirs) Smooths the data on specified direction or directions by method Type. Now 4 methods are supported:
SMOOTH_NONEdoes nothing for delta=0 or approaches data to zero with the step delta,SMOOTH_LINE_3linear averaging by 3 points,SMOOTH_LINE_5linear averaging by 5 points,SMOOTH_QUAD_5quadratic averaging by 5 points. Parameter delta forbids to change values of array more than delta from the original ones. String dirs specifies the dimensions which will be smoothed. It may contain characters: ’x’ for 1st dimension, ’y’ for 2nd dimension, ’z’ for 3d dimension.
- Метод класса
mglData(C++, Python):voidSmooth (const char *dir) Smooths the data on specified direction(s). This is the same as
Smooth()but argument Type is specified in string as ‘0’ forSMOOTH_NONE, ‘3’ forSMOOTH_LINE_3, ‘5’ forSMOOTH_LINE_5. If string dir don’t contain digits ‘035’ then Type=SMOOTH_QUAD_5is used.
- Метод класса
mglData(C++, Python):voidEnvelop (chardir='x') - Функция С:
voidmgl_data_envelop (HMDTdat,chardir) Find envelop for data values along direction dir.
- Метод класса
mglData(C++, Python):voidNorm (floatv1=0,floatv2=1,boolsym=false,intdim=0) Normalizes the data to range [v1,v2]. If flag sym=
truethen symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. Modification will be applied only for slices >=dim.
- Метод класса
mglData(C++, Python):voidNormSl (floatv1=0,floatv2=1,chardir='z',boolkeep_en=true,boolsym=false) - Функция С:
voidmgl_data_norm_slice (HMDTdat,floatv1,floatv2,chardir,intkeep_en,intsym) Normalizes data slice-by-slice along direction dir the data in slices to range [v1,v2]. If flag sym=
truethen symmetrical interval [-max(|v1|,|v2|), max(|v1|,|v2|)] is used. If keep_en is set then maximal value of k-th slice will be limited by \sqrt\sum a_ij(k)/\sum a_ij(0).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
