| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.6 Make another data
- Method on
mglData(C++, Python):mglDataSubData (intxx,intyy=-1,intzz=-1)const - C function:
HMDTmgl_data_subdata (const HMDTdat,intxx,intyy,intzz) Extracts sub-array data from the original data array keeping fixed positive index. For example
SubData(-1,2)extracts 3d row (indexes are zero based),SubData(4,-1)extracts 5th column,SubData(-1,-1,3)extracts 4th slice and so on.
- Method on
mglData(C++, Python):mglDataSubData (const mglData &xx,const mglData &yy,const mglData &zz)const - C function:
HMDTmgl_data_subdata_ext (const HMDTdat,const HMDTxx,const HMDTyy,const HMDTzz) Extracts sub-array data from the original data array for indexes specified by arrays xx, yy, zz (indirect access). The resulting array have the same dimensions as input arrays for 2D and 3D arguments. This function work like previous one for 1D arguments (or numbers). The dimensions of all argument must be the same if they are 2D or 3D arrays.
- Method on
mglData(C++, Python):mglDataColumn (const char *eq)const - C function:
HMDTmgl_data_column (const HMDTdat,const char *eq) Get column (or slice) of the data filled by formula eq of other named columns. For example,
Column("n*w^2/exp(t)");. The column ids must be defined first bySetColumnId()function.
- Method on
mglData(C++, Python):voidSetColumnId (const char *ids) - C function:
voidmgl_data_set_id (HMDTdat,const char *ids) Set the symbol id for data columns. The string must contain one symbol ’a’...’z’ per column (without spaces).
- Method on
mglData(C++, Python):mglDataTrace ()const Gets array of diagonal elements a[i,i] (for 2D case) or a[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1.
- Method on
mglData(C++, Python):mglDataHist (intn,floatv1=0,floatv2=1,intnsub=0)const - C function:
HMDTmgl_data_hist (const HMDTdat,intn,floatv1,floatv2,intnsub) Creates n-th points distribution of the data values in range [v1, v2]. Parameter nsub define the number of additional interpolated points (for smoothness of histogram).
- Method on
mglData(C++, Python):mglDataHist (const mglData &w,intn,floatv1=0,floatv2=1,intnsub=0)const - C function:
HMDTmgl_data_hist_w (const HMDTdat,const HMDTw,intn,floatv1,floatv2,intnsub) Creates n-th points distribution of the data values in range [v1, v2]. Array w specifies weights of the data elements. Parameter nsub define the number of additional interpolated points (for smoothness of histogram).
- Method on
mglData(C++, Python):mglDataMomentum (chardir,const char *how)const - C function:
HMDTmgl_data_momentum (const HMDTdat,chardir,const char *how) Get momentum (1D-array) of the data along direction dir. String how contain kind of momentum. The momentum is defined like as res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij if var=‘z’ and so on. Coordinates ‘x’, ‘y’, ‘z’ are data indexes normalized in range [0,1].
- Method on
mglData(C++, Python):mglDataSum (const char *dir)const - C function:
HMDTmgl_data_sum (const HMDTdat,const char *dir) Gets array which is the result of summation in given direction or direction(s).
- Method on
mglData(C++, Python):mglDataMax (const char *dir)const - C function:
HMDTmgl_data_max_dir (const HMDTdat,const char *dir) Gets array which is the maximal data values in given direction or direction(s).
- Method on
mglData(C++, Python):mglDataMin (const char *dir)const - C function:
HMDTmgl_data_min_dir (const HMDTdat,const char *dir) Gets array which is the maximal data values in given direction or direction(s).
- Method on
mglData(C++, Python):mglDataCombine (const mglData &a)const - C function:
HMDTmgl_data_combine (const HMDTdat,const HMDTa) Return direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on).
- Method on
mglData(C++, Python):mglDataEvaluate (const mglData &idat,boolnorm=true)const - Method on
mglData(C++, Python):mglDataEvaluate (const mglData &idat,const mglData &jdat,boolnorm=true)const - Method on
mglData(C++, Python):mglDataEvaluate (const mglData &idat,const mglData &jdat,const mglData &kdat,boolnorm=true)const - C function:
HMDTmgl_data_evaluate_i (const HMDTdat,const HMDTidat,intnorm) - C function:
HMDTmgl_data_evaluate_ij (const HMDTdat,const HMDTidat,const HMDTjdat,intnorm) - C function:
HMDTmgl_data_evaluate_ijk (const HMDTdat,const HMDTidat,const HMDTjdat,const HMDTkdat,intnorm) Get array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data idat, jdat, kdat. Coordinates from idat, jdat, kdat are supposed to be normalized in range [0,1] (if norm=
true) or in ranges [0,nx], [0,ny], [0,nz] correspondingly.
- Method on
mglData(C++, Python):mglDataResize (intmx,intmy=1,intmz=1,floatx1=0,floatx2=1,floaty1=0,floaty2=1,floatz1=0,floatz2=1)const - C function:
HMDTmgl_data_resize (const HMDTdat,intmx,intmy,intmz) - C function:
HMDTmgl_data_resize_box (const HMDTdat,intmx,intmy,intmz,floatx1,floatx2,floaty1,floaty2,floatz1,floatz2) Resizes the data to new size mx, my, mz from box (part) [x1,x2] x [y1,y2] x [z1,z2] of original array. Initially x,y,z coordinates are supposed to be in [0,1].
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
