>> a = iData([ ifitpath 'Data/ILL_IN6.dat'])
>> saveas(a,'','pdf') % save object as a PDF and use object ID as file name
>> saveas(a,'MakeItSo','hdf5') % save object as a HDF5 into specified filename. Extension is appended automatically
>> save(a,'MakeItSo','hdf5') % 'save' is equivalent to 'saveas'
>> a = saveas(iData, 'formats');Last, the getframe method generates a snapshot picture (thumbnail). The class2str function can more generally write any Matlab variable as a character string. And the str2struct function can read a character string and search for [name{=: }value] pairs in single lines, to set a return structure.
Convert
to |
Description |
cell(a) |
Convert the iData content and
field names to cell arrays |
char(a) |
Assemble Title/Label/Filename
into a comprehensive description (does not actually export the data) |
double(a) |
Extracts the object Signal as a
double float array, this is the same as double(a.Signal/a.Monitor) |
single(a) |
Extracts the object Signal as a
single float array, this is the same as single(a.Signal/a.Monitor), and uses less
memory than double. |
struct(a) |
Converts the object to a raw
structure. iData methods can not apply on the structure itself. Use
iData(structure) to come back to the initial object. |
iData(a) |
Import an
array/structure/cell/file and check iData object structure |
format (save) |
Text/Binary |
Lossless |
Description |
Read? |
'm' Matlab M-file |
text |
Yes |
The M-file format is a flat text
file which reconstructs the whole initial object. It
is
not
easily readable by humans, and
does
not have any compression mechanism, producing large files. Such
files can be imported directly by typing their name from Matlab, even
without iFit/iData installed. They can also be edited with any text
editor. |
Yes |
'dat' flat text file |
text |
Mostly |
The DAT format is a flat text
file with numerical blocks preceded with a header and readable
comments.
It can be edited with any text editor. Can be
re-imported with iFit/iData, but axes/alias
definitions are not re-generated. |
Yes |
format (save) |
Text/Binary |
Lossless |
Description |
Read? |
'mat' Matlab Mat-file |
binary |
Yes |
The Matlab workspace binary file is compact and fast to read/write. It carries the whole object information. Such files require Matlab (or Octave) to be installed prior to importation. | Yes |
'hdf5' HDF 5 |
binary |
Mostly |
The HDF5 format is a compact,
compressed binary storage format. However, in its use here, it does not
reconstruct the whole object, but only its main values and alias/axes
names. Such files can be edited/viewed with e.g hdfview, OpenDX. Such
files can of course also be imported into iData
objects. |
Yes |
'nc' NetCDF |
binary |
Mostly |
The NetCDF format is a compact binary format. However, in its use here, it does not reconstruct the whole object, but only its main values and alias/axes names. Such files can be edited/viewed with e.g ncview or ncBrowse. OpenDX, hdfview. Such files can of course also be imported into iData objects. | Yes |
format (save) |
Text/Binary |
Lossless |
Description |
Read? |
'fig' Matlab figure |
binary |
signal/monitor, with axes | The Matlab figure contains the 'visible' part of the object, and can be re-opened/edited from Matlab. |
Yes, use openfig, then iData(gcf). |
'csv' Matlab comma separated values |
text |
signal only |
The comma separated value format is a single dump of the object Signal. The other information is lost. Such files can be imported by e.g. any spreadsheet software (OpenOffice, Excel, Gnumeric), or with iFit/iData. | Yes |
'hdf4' HDF 4 image |
binary |
signal only |
The HDF4 format is a compact, binary storage format. However, in its use here, it does not reconstruct the whole object, but only its Signal/Monitor values as an image. Such files can be edited/viewed with e.g hdfview. Such files can of course also be imported into iData objects. IDL and Matlab also have dedicated HDF 4 browsers (see hdftool). | Yes |
'edf' EDF ESRF Data format |
binary with 512-multiple length
text header |
signal plus limited metadata |
The EDF format is mainly used at
the ESRF and can be viewed with e.g. PyMCA, Zimg, GnuPlot, EDFExplorer, Fit2D. This
format saves a single image/numeric block plus some metadata in its
header. |
Yes |
'gif' 'bmp' 'png' 'tiff' 'jpeg' |
binary |
signal only or signal/monitor |
Standard image formats. Can be
re-imported with iFit/iData, or used elsewhere
(web, email, ...). View with e.g. GIMP, xv. |
Yes |
'ps' 'eps' PostScript |
text/binary |
signal/monitor, with axes |
Usual PostScript files. Can be directly printed. Edit/View with Adobe Illustrator, Acrobat Reader, Gnome/Evince, GIMP. | |
'pdf' Adobe PDF |
binary |
signal/monitor, with axes |
A portable format for displaying/printing with e.g. Acrobat Reader or Google Chrome, Gnome/Evince, GIMP. | |
'ill' Adobe Illustrator |
binary |
signal/monitor, with axes | Similar to PostScript. Files are
large. Edit/View with Adobe Illustrator. |
|
'xls' Excel spreadsheet |
binary |
signal only |
Exports as a single spreadsheet. Requires Excel to be installed. Can be re-imported with iFit/iData. | Yes |
'svg' Scalable Vector Graphics |
text/binary |
signal/monitor, with axes | A portable editable vectorial representation of the object. Can be viewed with e.g. Inkscape, GIMP. | |
'wrl' Virtual Reality world (VRML) |
text |
signal/monitor, with axes | A portable editable vectorial
representation of the object. Can be viewed with e.g Freewrl, Octaga Player, WhiteDune, View3DScene... |
|
'vtk' Visual ToolKit |
text/binary |
signal/monitor, with some metadata |
A portable vectorial representation of 1D/2D/3D objects. Can be viewed with ParaView and Mayavi2. |