Asdreadr: Difference between revisions
Jump to navigation
Jump to search
imported>Scott (Created page with '===Purpose=== Imports data from Analytical Spectral Devices (ASD) Indico (Versions 6 and 7) data files. ===Synopsis=== : out = asdreadr('filename',options) : out = asdreadr({'…') |
imported>Scott |
||
Line 12: | Line 12: | ||
====Outputs==== | ====Outputs==== | ||
* '''out''' = one or more dataset (IN SAME ORDER as names in options.requestedfields). | * '''out''' = one or more dataset (IN SAME ORDER as names in options.requestedfields). A dataset is returned for each valid requested ASD data field. The valid field names are listed above for option.requestedfields. The default is 'ratio', which is the ratio of the spectrum / reference fields. For example, when options.requestedfields = {'spectrumdata' 'ratio'} then the command "[ds1 ds2] = asdreadr(filenames, options);" will return two output datasets, ds1 and ds2. The dataset ds1 contains the spectrumdata data (ds1.data) with dimensions (nx x nchannels), where nx is the number of successfully imported files and nchannels is the unique number of channels read in each file. Similarly dataset ds2 contains the requested 'ratio' data. Header information read from each file is available in the dataset's userinfo field, for example: ds1.userdata.metadata(1).spectrumFileHeader contains information from the SpectrumFileHeader section of the first imported file. | ||
===Options=== | ===Options=== |
Revision as of 13:01, 11 February 2010
Purpose
Imports data from Analytical Spectral Devices (ASD) Indico (Versions 6 and 7) data files.
Synopsis
- out = asdreadr('filename',options)
- out = asdreadr({'filename' 'filename2'},options)
Inputs
- filename = a text string with the name of an ASD file or a cell of strings of ASD filenames. If (filename) is omitted or an empty cell or array, the user will be prompted to select a folder and then one or more files in the identified folder. If (filename) is a blank string , the user will be prompted to select a single file.
Outputs
- out = one or more dataset (IN SAME ORDER as names in options.requestedfields). A dataset is returned for each valid requested ASD data field. The valid field names are listed above for option.requestedfields. The default is 'ratio', which is the ratio of the spectrum / reference fields. For example, when options.requestedfields = {'spectrumdata' 'ratio'} then the command "[ds1 ds2] = asdreadr(filenames, options);" will return two output datasets, ds1 and ds2. The dataset ds1 contains the spectrumdata data (ds1.data) with dimensions (nx x nchannels), where nx is the number of successfully imported files and nchannels is the unique number of channels read in each file. Similarly dataset ds2 contains the requested 'ratio' data. Header information read from each file is available in the dataset's userinfo field, for example: ds1.userdata.metadata(1).spectrumFileHeader contains information from the SpectrumFileHeader section of the first imported file.
Options
options = a structure array with the following fields:
- requestedfields: [ {'ratio'} ] and/or any combination of: 'spectrumdata' 'referencedata' 'basecalibrationdata' 'lampcalibrationdata' 'fiberopticcalibrationdata'. A dataset will be returned for each field included.
- display: governs level of display to command window.