iFit: iData methods
- data structure, aliases, signal and
axes
- general
- import/export/type casting
- testing/comparing
- math: common operators
- math: convolution, correlation and
Fourier transforms
- math: statistics, fitting and peak
searching
- math: integration and derivatives,
projections
- math: combination and
merging/assembling
- math: interpolation
- plotting
In this page, links are valid when browsed from Matlab with the
command:
>> methods(iData)
The help windows then displays the help for each command (usage,
input and output arguments, examples, ...).
To get help of any of these iData methods,
type e.g.:
>> help iData/load
Most of these methods are also valid for iFunc
model objects, and the naming corresponds with standard Matlab
functions.
The full technical documentation is available for iData and iFunc objects.
data structure, aliases, signal and
axes
A dedicated documentation about the iData
object is available.
- iData:
defines a new iData object from variables,
arrays, files, figures and more.
- set: sets
an iData property or alias value
- get: gets
an iData property or alias value, or the whole object
description
- setalias: defines
an alias, that is a new member or link within the object
- getalias: gets
an alias definition
- label: defines
the object alias labels, signal and axes labels
- xlabel: sets
or get 2nd rank axis label (along columns)
- ylabel: sets
or get 1st rank axis label (along rows)
- zlabel: sets
or get the 3rd rank axis label (vertical)
- clabel: sets
or get the 4th rank axis label
- rmalias: removes
an alias definition
- rmaxis: removes
an axis definition, falling back to default axes
- setaxis
and a{n}: defines
an axis as a link to an alias or object member. The axis 0
refers to the Signal/Monitor.
- getaxis
and a{n}:
gets the axis value and definition. The axis 0 refers to the
Signal/Monitor.
- ndims: returns
the dimentionality of the object (number of axes, rank of
signal)
- size: returns
the size of the object (length of each object dimension)
- squeeze: removes
singleton dimension from iData object or array
- isfield: checks
if a name is defined in the iData object as a structure field or
alias
- circshift:
shifts an axis by a given quantify, equivalent to a{n} =
a{n} +delta
- fileattrib:
sets/gets object property attributes, extracted from initial
file (text/HDF/NeXus/CDF/NetCDF)
general
A dedicated documentation about the iData object is available.
- commandhistory:
returns the list of past commands performed in
order to get the current object. It is also possible to export
the history of an object into a Matlab script.
- copyobj: copies
an object into a new one with unique ID (Tag)
- disp: displays
the object description, aliases and axes
- display: displays
a short description of the object
- edit: edits the
Signal/Monitor of the object as a Table/spreadsheet.
- doc: opens
the iData documentation as web pages
- methods: opens the
iData methods documentation (this page)
- fill:
clean/ replaces NaN values in object Signal with a
neighboring interpolation. This is especially useful after
building an histogram from an event list.
- findfield: searches
in objects for a field/alias that matches a pattern
- findobj: searches
for objects in the workspace/memory
- findstr: searches
in objects for strings, and return the corresponding content and
members
- flipud: flips
along up/down, that is revert the Y axis (vertical) on 2D
objects
- fliplr:
flips along left/right, that is revert the X axis
(horizontal) on 2D objects
- full: switches
the object to a full array storage
- help: displays an information dialogue about a data set
- ind2sub: gets
indexed element in an object array
- pack: selects
automatically the full or sparse storage in order to lower the
memory usage
- permute: dimensions
permutation (generalized transposition)
- reshape: re-orders
elements of an object
- reducevolume:
rebins the object so that it contains a larger binning, or
less that 1e6 elements
- resize: fast rebinning of an
object
- sparse: switches
the object to a sparse array storage (which uses less memory
when data has many zeros)
- version: displays
the iData library version
import/export/type casting
Dedicated documentations about Loading and
Saving objects are available.
- iData:
defines a new iData object from variables,
arrays, files, figures and more.
- load: loads
file(s) and convert it into an iData object
- saveas: exports
objects into many formats (pdf, jpg, eps, ...)
- save:
is the same as saveas.
- avifile: export a 2D/3D data set as a movie (rotating the view)
- cell: converts
an object into a cell
- char: converts
an object into a char, and returns a long title/identification
string
- csvwrite: write a data set as a CSV (Excel) file
- double: converts
an object into a double array, and returns the object
Signal/Monitor
- findobj: finds
iData objects in memory
- getframe: creates
a snapshopt image from an object (thumbnail)
- imag: extracts
the
imaginary
part
of
an
object
- imwrite: write a data set as an image
- logical: converts
an object into a logical array (true/false)
- ones: initialize
an
array
of
objects
(same as zeros)
- publish: export a data set as an HTML document
- real: extracts
the real part of an object
- single: converts
an
object
into
a
single
float
array
and
returns Signal/Monitor
- struct: convert an object into a structure
- xmlwrite: write a data set as an XML file
- zeros: initialize
an
array
of
objects
(same as ones)
testing/comparing
A dedicated documentation about the iData comparison operators is
available.
- find: finds
non zeros elements in objects Signal
- isempty: tests
objects for emptyness (dimension=0)
- gt
and >: greater than
comparison
- lt
and <:
lower than comparison
- ge
and >=:
greater or equal than comparison
- le
and <=:
greater or equal than comparison
- eq
and ==:
equal comparison
- ne
and ~=:
not equal comparison
- isfinite: returns
index of elements which are non NaN or Inf
- isfloat: tests
if object Signal stores single or double floats
- isinf: tests
if object Signal contains infinite values
- isinteger: tests
if object Signal stores integers
- islogical: tests
if object Signal stores logicals (true/false)
- isnan: tests
if object Signal contains NaN values
- isnumeric: tests
if object Signal stores integers, single or double floats
- isreal:
tests
if
object Signal stores real values (that is no imaginary part)
- isscalar: tests
if object is a single value (dim=length=1)
- issparse: tests
if object Signal is stored as a sparse array
- isvector: tests
if object is a vector (dim=1)
- not: not
equal comparison
- sign: returns
the sign of Signal elements
math: common operators
A dedicated documentation about the iData mathematical operators
is available.
math: convolution, correlation and
Fourier transforms
A dedicated documentation about the iData mathematical operators
is available.
- conv: convolution. When convolution is to be
carried out with a response function (filter), the convn function
should be used, which makes sure the filter is centered and
normalized. These methods use the fconv and fconvn functions
(multidimensional FFT convolution).
- convn: same as conv, with a normalisation
and centering of the second signal (response function).
- cwt: the continuous
wavelet transform along an axis.
- deconv:
a deconvolution operator which can work using FFT or iterative.
- fft: fast Fourier
transform, which also transforms the reciprocal axis.
- ifft: inverse fast
Fourier transform, which also transforms the reciprocal axis.
- xcorr: correlation
of two signals (same as convolution, with one of the signals
conjugated). This method uses the fxcorr function
(multidimensional FFT correlation). With only one input, this is the auto-correlation.
- smooth:
smooth a data set using a robust spline smoothing or a
Savitsky-Golay average.
math: statistics, fitting and peak
searching
Dedicated documentations about the iData analysis operators and fitting are available.
- min: returns the
minimum Signal value or the minimum of two objects.
- max: returns the
maximum Signal value or the maximum of two objects.
- mean: returns the
mean Signal value.
- median: returns the
median Signal value.
- std: computes the
standard deviation (second moment) of object along each axis,
that is the Gaussian half width. The center of mass/first moment
can also be obtained.
- peaks: returns a fast
analysis of object and returns peak positions, amplitudes and
width, as well as base-line/background.
- object(model, parameters,
...): evaluates a model function onto object axes.
- fits: finds best
model parameters to fit the Signal.
New fit functions/models can be created with the iFunc/Model Builder
tool.
- corrcoef: compute
the correlation
coefficient (Pearson) between an object and something else.
- kmeans: data
segmentation in k partitions/groups/clusters/segments
- pca: principal
component analysis in a k-space
math: integration and derivatives,
projections
A dedicated documentation about the iData
mathematical operators is available.
- camproj: extracts the
projection of the object onto a selected axis by summing along
all other dimensions. The resulting object is a vectorial object
(ndims=1). The projection along one axis is the sum along all
other axes. When dim='radial'
a radial integration is performed (assumes all axes are of
coordinates).
- cart2sph: transforms
an object from Cartesian to spherical/polar coordinates.
- trapz: integrates
object along a given dimension. The resulting object has this
dimension removed. As opposed to sum, the trapz
method takes into account the axis binning, which may be uneven.
- sum: sums object
along a given dimension. The resulting object has this dimension
removed. As opposed to trapz,
the sum method
does not take into account the axis binning.
- norm: computes
the norm-2 of the object Signal.
- prod: multiplies
object elements along a given dimension. The resulting object
has this dimension removed. This method does not take into
account the axis binning.
- cumtrapz: computes the accumulated
integral of an object along a given dimension, that is the
primitive. The result has the same dimension as the initial
object, and its last element/slice along the specified dimension
is the result of the sum
method.
- cumsum: computes the
accumulated sum of an object along a given dimension. The result
has the same dimension as the initial object, and its last
element/slice along the specified dimension is the result of the
sum method. This is the
signal primitive, equal to cumtrapz
when dx=1.
- cumprod: computes the
accumulated product of an object along a given dimension. The
result has the same dimension as the initial object, and its
last element/slice along the specified dimension is the result
of the prod method.
- del2: computes the
Laplacian (local curvature, sum of the second partial
derivatives).
- gradient: computes
the gradient (derivatives) of an object.
- diff: computes the
gradient for the 1sty axis only (rows).
- jacobian: computes
the Jacobian from the object current axes to new axes. This is
to be used for object coordinate changes. The 'from' and 'to' axes should have the
same dimensions. The transformed object is returned, as well as
the Jacobian which was used for the transformation.
math: combination, merging/assembling, slicing
A dedicated documentation about the iData mathematical operators
is available.
- combine: merges/combines
objects.
The resulting object has the same dimensionality as the initial
ones, but may have a different sampling along axes. Its Signal
is the sum of Signals weighted by the Monitors, performed on the
intersection range of axes. Fast
notation
is \
- cat: concatenates/appends
objects.
If
the
specified
dimension
does
not
exist
yet, objects are appended side by side in order to extend its
dimensionality along a given axis and create e.g. a
surface/volume. If the specified dimension already exists, the
objects are appended one after the other, along the dimension.
- dog: splits an object
along a given dimension. The result is a vector of objects
containing the series of slices. This is the opposite operation
to cat !
- imroi: interactively define region-of-interest in 1D-2D-3D objects
- object(n,:,...) extract the n-th slice on the X (1st) axis. n can be given as a vector e.g. [1 3] or a range 1:3
- object(:,n,...) extract the n-th slice on the Y (2nd) axis. n can be given as a vector e.g. [1 3] or a range 1:3
- slice: displays a 2D/3D/4D data set and allows to define orthogonal slices and isosurfaces.
math: interpolation
A dedicated documentation about the these operators is available.
- linspace: creates
continuous linear series of objects between two objects used as
bounds. This is a kind of morphing from one object to another
one.
- logspace: creates
continuous logarithmic series of objects between two objects
used as bounds. This is a kind of morphing from one object to
another one.
- colon: creates a
continuous linear object array with a number of steps which is
the difference between mean values. Fast notation is ':'
- event:
convert a column data set into an event list.
- fill:
replaces NaN values in object Signal with a neighboring
interpolation. This is especially useful after building an
histogram from an event list.
- hist: converts an
event type object into an histogrammed nD grid object.
- interp: interpolates
objects along a new set of axes. This method is in particular
used to prepare objects before performing most binary
operations.
- intersect: computes
intersection of axes between objects. This method is in
particular used in order to determine the operational range in
binary operations.
- meshgrid:
transforms an iData object so that its axes are grids.
- union: computes union
of axes between objects. This method is in particular used when
concatenating objects.
- sort: sorts objects
axes and reorder the corresponding signal.
- smooth:
smooth a data set using a robust spline smoothing or a
Savitsky-Golay average.
- resize: fast rebinning of an
object.
plotting
A dedicated documentation about the plotting
is available.
- plot: plots the
objects, what ever be its dimensionality up to 3, that is signal=f(x,y,z)
- clabel: sets/gets the
4th axis label
- clim: sets/gets the 4th axis limits. This
crops the initial object. Use the normal clim([ min max]) to only
affect the view.
- xlim: sets/gets the 2nd axis limits. This crops
the initial object. Use the normal xlim([ min max]) to only affect the view.
- ylim: sets/gets the 1st axis limits. This crops
the initial object. Use the normal ylim([ min max]) to only affect the view.
- zlim: sets/gets the 3rd axis limits. This crops
the initial object. Use the normal zlim([ min max]) to only affect the view.
- caxis: remap a
surface colours (CData) with the value of an iData object.
- label: sets/gets the
object Label, or axes/signal labels. Use title to change the object
title.
- getframe: creates a
snapshot image from an object (thumbnail)
- contour: plots a 2D
object as a set of contour lines
- contour3: plots a 2D
object as a set of contour lines in 3D
- mesh: plots a 2D
object as a mesh (wired network)
- plot3: plots a 2D/3D
object as points. An array of 1D objects is shown as a
waterfall.
- surf: plots a 2D/3D
object as a surface. An array of 1D objects is shown as a
waterfall.
- surfc: plots a
2D/3D object as a surface with a contour below. An array of 1D
objects is shown as a waterfall.
- surfl: plots a
2D/3D object as a surface with light. An array of 1D objects is
shown as a waterfall.
- scatter3: plots a
2D/3D object as coloured points. An array of 1D objects is shown
as a waterfall.
- waterfall:
plots a 2D/3D object as a waterfall. An array of 1D objects is
shown as a waterfall.
- pcolor: plots a 2D/3D
object as a flat coloured image.
- image: plots up
to 3 objects overlayed onto the RGB channels. One object at
least must be 2D.
- colormap: plots an
array of 2D objects, each with a separate color rendering.
- slice: opens a slice
viewer (sliceomatic) for 3D/4D objects
- xlabel: sets/gets the
X axis (2nd rank) label
- ylabel: sets/gets the
Y axis (1st rank) label
- zlabel: sets/gets the
Z axis (3rd rank) label
- clabel: sets/gets the
C axis (4th rank) label
- subplot: plots an
array of objects as plots in the same window
- title: sets/gets the
object Signal title.
To assign the object title, use object.Title='string'.
E.
Farhi
- iFit/iData methods -
Nov. 27, 2018 2.0.2 -
back to
Main iFit Page