| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.6 Make another data
- MGL command: subdata RES dat
xx [yy=: zz=:] - Method on
mglData:mglDataSubData (floatxx,floatyy=-1,floatzz=-1)const - C function:
HMDTmgl_data_subdata (HCDTdat,floatxx,floatyy,floatzz) 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. If argument(s) are non-integer then linear interpolation between slices is used. In MGL version this command usually is used as inline onedat(xx,yy,zz).
- MGL command: subdata RES dat xdat [ydat=: zdat=:]
- Method on
mglData:mglDataSubData (const mglData &xx,const mglData &yy,const mglData &zz)const - C function:
HMDTmgl_data_subdata_ext (HCDTdat,HCDTxx,HCDTyy,HCDTzz) Extracts sub-array data from the original data array for indexes specified by arrays xx, yy, zz (indirect access). This function work like previous one for 1D arguments or numbers, and resulting array dimensions are equal dimensions of 1D arrays for corresponding direction. For 2D and 3D arrays in arguments, the resulting array have the same dimensions as input arrays. The dimensions of all argument must be the same (or to be scalar 1*1*1) if they are 2D or 3D arrays. In MGL version this command usually is used as inline one
dat(xx,yy,zz).
- MGL command: column RES dat 'eq'
- Method on
mglData:mglDataColumn (const char *eq)const - C function:
HMDTmgl_data_column (HCDTdat,const char *eq) Get column (or slice) of the data filled by formula eq on column ids. For example,
Column("n*w^2/exp(t)");. The column ids must be defined first by idset function or read from files. In MGL version this command usually is used as inline onedat('eq').
- MGL command: resize RES dat
mx [my=1 mz=1] - Method on
mglData:mglDataResize (intmx,intmy=1,intmz=1,floatx1=0,floatx2=1,floaty1=0,floaty2=1,floatz1=0,floatz2=1)const - C function:
HMDTmgl_data_resize (HCDTdat,intmx,intmy,intmz) - C function:
HMDTmgl_data_resize_box (HCDTdat,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].
- MGL command: evaluate RES dat idat [
norm=on] - MGL command: evaluate RES dat idat jdat [
norm=on] - MGL command: evaluate RES dat idat jdat kdat [
norm=on] - Method on
mglData:mglDataEvaluate (const mglData &idat,boolnorm=true)const - Method on
mglData:mglDataEvaluate (const mglData &idat,const mglData &jdat,boolnorm=true)const - Method on
mglData:mglDataEvaluate (const mglData &idat,const mglData &jdat,const mglData &kdat,boolnorm=true)const - C function:
HMDTmgl_data_evaluate (HCDTdat,HCDTidat,HCDTjdat,HCDTkdat,intnorm) Gets 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.
- MGL command: hist RES dat
num v1 v2 [nsub=0] - MGL command: hist RES dat wdat
num v1 v2 [nsub=0] - Method on
mglData:mglDataHist (intn,floatv1=0,floatv2=1,intnsub=0)const - Method on
mglData:mglDataHist (const mglData &w,intn,floatv1=0,floatv2=1,intnsub=0)const - C function:
HMDTmgl_data_hist (HCDTdat,intn,floatv1,floatv2,intnsub) - C function:
HMDTmgl_data_hist_w (HCDTdat,HCDTw,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 (by default is 1). Parameter nsub define the number of additional interpolated points (for smoothness of histogram). See also Data manipulation
- MGL command: momentum RES dat 'how' ['dir'='z']
- Method on
mglData:mglDataMomentum (chardir,const char *how)const - C function:
HMDTmgl_data_momentum (HCDTdat,chardir,const char *how) Gets 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].
- MGL command: sum RES dat 'dir'
- Method on
mglData:mglDataSum (const char *dir)const - C function:
HMDTmgl_data_sum (HCDTdat,const char *dir) Gets array which is the result of summation in given direction or direction(s).
- MGL command: max RES dat 'dir'
- Method on
mglData:mglDataMax (const char *dir)const - C function:
HMDTmgl_data_max_dir (HCDTdat,const char *dir) Gets array which is the maximal data values in given direction or direction(s).
- MGL command: min RES dat 'dir'
- Method on
mglData:mglDataMin (const char *dir)const - C function:
HMDTmgl_data_min_dir (HCDTdat,const char *dir) Gets array which is the maximal data values in given direction or direction(s).
- MGL command: combine RES adat bdat
- Method on
mglData:mglDataCombine (const mglData &a)const - C function:
HMDTmgl_data_combine (HCDTdat,HCDTa) Returns direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on).
- MGL command: trace RES dat
- Method on
mglData: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.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 13, 2012 using texi2html 5.0.
