Asfreadr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
imported>Donal
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===Purpose===
===Purpose===


Reads a Hamilton Sundstrand data file.
Reads an AIT data file.


===Synopsis===
===Synopsis===


:x = asfreadr(filename,''options'')
:x = asfreadr(filename,''options'')
:x = asfreadr({'filename' 'filename2'},''options'')


===Description===
===Description===


ASFREADR reads a Hamilton Sundstrand spectral file (ASF, AIF, and BKH extensions).
ASFREADR reads an AIT spectral file (ASF, AIF, and BKH extensions).


====Inputs====
====Inputs====


* '''filename''' = a text string with the name of a spectral file or a cell of strings of filenames.
* '''filename''' = a text string with the name of a spectral file or a cell of strings of filenames.
 
**  If filename is omitted or blank, the user will be prompted to select a file graphically.
'''If''' filename is omitted or blank, the user will be prompted to select a file graphically.
**  If filename is an empty cell {}, the user will be prompted to select a folder and then one or more AIT files in the identified folder.
 
'''If''' filename is an empty cell {}, the user will be prompted to select a folder and then one or more Hamilton Sundstrand files in the identified folder.


====Outputs====
====Outputs====


* '''x''' = a dataset object containing the spectrum.  If multiple files are used for input, the output dataset object will contain the spectral data for each file '''if''' the data types are compatible, the number of points are identical, and the x-axes all match.  Otherwise a cell array of dataset objects or 'error' is returned, depending upon the ''options'' input.
* '''x''' = takes one of two forms:


# If input is a single file, or multiple files containing data that can be combined (same number of data points, same x-axis range, same type of data), the output is a dataset object,
# If the input consists of multiple files containing data that cannot simply be combined (different number of data points, differing x-axis ranges, etc), the output is either:
::: a) a cell array with a dataset object for each input file if the 'nonmatching' option has value 'cell', or
::: b) a dataset object containing the input data combined using the MATCHVARS function if the 'nonmatching' option has value 'matchvars'.


===Options===
===Options===
Line 28: Line 31:
''options'' =  a structure array with the following fields:
''options'' =  a structure array with the following fields:


* '''nonmatching''': [ 'error' | {'cell'} ], defines action taken when the x-axes or data types of multiple spectra being read do not match. The default choice, 'cell', returns a cell array where each element is a dataset object with data from a single file.  The other choice, 'error', will return an error when the files do not match.
* '''nonmatching''': [ 'error' |{'matchvars'} 'cell'] governs behavior when multiple files are being read which cannot be combined due to mismatched types, sizes, etc.
** '''matchvars''' returns a dataset object with the files' data joined using the matchvars algorithm,
** '''cell''' returns a cell array of the files' datasets,  
** '''error''' gives an error.
 
* '''multiselect''' : [ 'off' | {'on'} ] governs whether file selection dialog should allow multiple files to be selected and imported. Setting to 'off' will restrict user to importing only one file at a time.


===See Also===
===See Also===


[[asdreadr]], [[asfreadr]], [[editds]], [[hjyreadr]], [[jcampreadr]],
[[Data Importing Formats]], [[asdreadr]], [[asfreadr]], [[fluoromaxreadr]], [[gwscanreadr]], [[hjyreadr]], [[jcampreadr]],
[[pdfreadr]], [[spareadr]], [[spcreadr]], [[writeasf]], [[xclreadr]]
[[opusreadr]], [[pdfreadr]], [[pereadr]], [[spareadr]], [[spcreadr]], [[writeasf]], [[xclreadr]]

Latest revision as of 15:40, 18 June 2015

Purpose

Reads an AIT data file.

Synopsis

x = asfreadr(filename,options)
x = asfreadr({'filename' 'filename2'},options)

Description

ASFREADR reads an AIT spectral file (ASF, AIF, and BKH extensions).

Inputs

  • filename = a text string with the name of a spectral file or a cell of strings of filenames.
    • If filename is omitted or blank, the user will be prompted to select a file graphically.
    • If filename is an empty cell {}, the user will be prompted to select a folder and then one or more AIT files in the identified folder.

Outputs

  • x = takes one of two forms:
  1. If input is a single file, or multiple files containing data that can be combined (same number of data points, same x-axis range, same type of data), the output is a dataset object,
  2. If the input consists of multiple files containing data that cannot simply be combined (different number of data points, differing x-axis ranges, etc), the output is either:
a) a cell array with a dataset object for each input file if the 'nonmatching' option has value 'cell', or
b) a dataset object containing the input data combined using the MATCHVARS function if the 'nonmatching' option has value 'matchvars'.

Options

options = a structure array with the following fields:

  • nonmatching: [ 'error' |{'matchvars'} 'cell'] governs behavior when multiple files are being read which cannot be combined due to mismatched types, sizes, etc.
    • matchvars returns a dataset object with the files' data joined using the matchvars algorithm,
    • cell returns a cell array of the files' datasets,
    • error gives an error.
  • multiselect : [ 'off' | {'on'} ] governs whether file selection dialog should allow multiple files to be selected and imported. Setting to 'off' will restrict user to importing only one file at a time.

See Also

Data Importing Formats, asdreadr, asfreadr, fluoromaxreadr, gwscanreadr, hjyreadr, jcampreadr, opusreadr, pdfreadr, pereadr, spareadr, spcreadr, writeasf, xclreadr