Home > Objects > @iData > load.m

iFit/load

PURPOSE ^

d = load(s, file, loader, ...): iData file loader

SYNOPSIS ^

function out = load(a, varargin)

DESCRIPTION ^

 d = load(s, file, loader, ...): iData file loader

   @iData/load: imports any data into Matlab/iData object(s)
   The input argument 'file' should be a file name, or a cell of file names, 
     or any Matlab variable, or empty (then popup a file selector).
   The choice of the data file importer is set by default to automatic, so
     that most common data importers are tested until one works. User may configure
     a list of prefered loader definitions in a file called iLoad_ini.
   The optional 3rd argument can be set to use a specific loader list (see below)
     load(iData, filename, loader)
   The input iData object is updated if no output argument is specified.

   Default supported formats include: any text based including CSV, Lotus1-2-3, SUN sound, 
     WAV sound, AVI movie, NetCDF, FITS, XLS, BMP GIF JPEG TIFF PNG ICO images,
     HDF4, HDF5, MAT workspace, XML, CDF, JSON, YAML, IDL
   Other specialized formats include: McStas, ILL, SPEC, ISIS/SPE, INX, EDF, Mantid.
     SIF, MCCD/TIFF, ADSC, CBF, Analyze, NifTI, STL,PLY,OFF, CIF/CFL,
     EZD/CCP4, Bruker Varian and JEOL NMR formats, Bruker OPUS, LabView LVM and TDMS
     Agilent and Thermo Finnigan MS, Quantum Design VMS, ENDF
   Compressed files are also supported, with on-the-fly extraction (zip, gz, tar, Z).
   Distant files are supported through e.g. URLs such as 
     file://, ftp://, http:// and https://
   File names may end with an internal anchor reference '#anchor", as used in HTML 
     links, in which case the members matching the anchor are returned.
   The list of supported formats to create iData objects is obtained with:
     load(iData,'formats')

  Type <a href="matlab:doc(iData,'Load')">doc(iData,'Load')</a> to access the iFit/Load Documentation.

 input:  s: object or array (iData)
         file: file name(s) to import (char/cellstr)
         loader: optional loader method specification (char/struct/cellstr/array of struct)
               loader = 'auto' (default) test all known data readers until one works
               loader = 'gui'  manually ask user for the loader(s) to use
             OR a function name to use as import routine, OR a struct/cell of struct with:
               loader.method     = function to read data file (char/function_handle)
               loader.options    = options (char/cell which is then expanded)
               loader.postprocess= function to act on freshly imported iData (char/function_handle)
         additional arguments are passed to the import routine.

 The loading process calls first
   data =loader.method(filename, options...)
 then build the iData object, and optionally calls
   iData=loader.postprocess(iData)

 output: d: single object or array (iData)
 ex:     load(iData,'file'); load(iData); load(iData, 'file', 'gui'); load(a,'','looktxt')
         load(iData, [ ifitpath 'Data/peaks.hdf5' ], 'HDF')
         load(iData, 'http://file.gz#Data')

 Version: Nov. 26, 2018
 See also: iLoad, save, iData/saveas, Loaders

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1