Opusreadr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Donal
No edit summary
imported>Donal
Line 45: Line 45:


===Options===
===Options===
Input 'options' is an options structure containing the following fields
Input 'options' is a structure containing the following fields
*'''spectrumtype''': <tt>[{'absorbance'}| 'reflectance' | othertypes ]</tt> Specify the spectrum type of the data in the imported file(s). If empty, the most commonly used type is selected (based on the "typepriority" option below). The full list of spectrumtypes is given above in the '''Description''' section.
*'''spectrumtype''': <tt>[{''} | othertypes ]</tt> Specify which data type to read. If empty, the most commonly used type is selected (based on the "typepriority" option below) Spectrum types include: 'absorbance', 'transmittance', 'kubelka-munck spectrum', 'trace', 'raman spectrum', 'emission', 'reflectance' (among others). The entire list of types can be obtained by calling opusreader with the keyword 'types'.
*'''typepriority''': Specifies a list of spectrum types (in numerical format) in the order that the given block type should be selected if present. This list is used when the spectrumtype is empty, indicating that the most common block should be used.
*'''typepriority''': Specifies a list of spectrum types (in numerical format) in the order that the given block type should be selected if present. This list is used when the spectrumtype is empty, indicating that the most common block should be used.
*'''multiblock''': [{1}] Defines which block to read when more than one block in a file has the "spectrumtype" type. The value can be any integer between 0 (zero) and infinity but the following are typical settings:
*'''multiblock''': [{1}] Defines which block to read when more than one block in a file has the "spectrumtype" type. The value can be any integer between 0 (zero) and infinity but the following are typical settings:
Line 54: Line 54:
::2-n = Chooses the specified block matching the type Mostly useful when an exact sequence of steps have been used in creating the OPUS file and the user knows a specific step in that sequence is the version of the data needed.
::2-n = Chooses the specified block matching the type Mostly useful when an exact sequence of steps have been used in creating the OPUS file and the user knows a specific step in that sequence is the version of the data needed.
*'''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.
*'''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.
*'''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,
::: 'cell' returns cell (see outputs, below),
::: 'error' gives an error.
*'''waitbar''': <tt>[ 'off' |{'on'}]</tt> Governs display of a progress bar when doing multiple file reading.
*'''waitbar''': <tt>[ 'off' |{'on'}]</tt> Governs display of a progress bar when doing multiple file reading.



Revision as of 12:40, 17 June 2015

Purpose

Reads Bruker OPUS files into a DataSet object.

Synopsis

data = opusreadr(filename,options)
data = opusreadr({'filename' 'filename2'},options)

Description

OPUSREADR reads in Burker OPUS files (which use a numeric extensions, .#, .####, etc).

Inputs

Input is the filename of a Bruker OPUS file to read. If omitted, the user is prompted for a file. The reader reads files of type:

interferogram,
phase,
absorbance,
transmittance,
kubelka-munck spectrum,
raman spectrum,
emission,
reflectance,
trace,
gc file, interferograms,
gc file, spectra,
power,
- log reflectance,
photoacoustic spectrum.

Multiple input files must contain the same axisscale for the wavelength (variables) mode. The imported files are returned in a Dataset Object.

Optional Inputs

  • filename = specifies the file(s) to read using:
(a) a string specifying a single file to read
(b) a cell array of strings specifying multiple files to read
(c) the output of the MATLAB "dir" command specifying multiple files to read
If fname is an empty string or matrix or is not supplied, the user is prompted to identify file(s) to load.
  • options = an optional options structure. See Options below.

Outputs

  • data = a DataSet object containing the spectrum or spectra from the file(s), or an empty array if no data could be read.

Options

Input 'options' is a structure containing the following fields

  • spectrumtype: [{} | othertypes ] Specify which data type to read. If empty, the most commonly used type is selected (based on the "typepriority" option below) Spectrum types include: 'absorbance', 'transmittance', 'kubelka-munck spectrum', 'trace', 'raman spectrum', 'emission', 'reflectance' (among others). The entire list of types can be obtained by calling opusreader with the keyword 'types'.
  • typepriority: Specifies a list of spectrum types (in numerical format) in the order that the given block type should be selected if present. This list is used when the spectrumtype is empty, indicating that the most common block should be used.
  • multiblock: [{1}] Defines which block to read when more than one block in a file has the "spectrumtype" type. The value can be any integer between 0 (zero) and infinity but the following are typical settings:
0 = Throws an error "multiple blocks are present"
1 = Always choose the first block matching the type. The first block is usually the original, un-preprocessed version of the data.
inf = Always choose the last block mathcing the type. The last block is usually a modified (processed) version of the data.
2-n = Chooses the specified block matching the type Mostly useful when an exact sequence of steps have been used in creating the OPUS file and the user knows a specific step in that sequence is the version of the data needed.
  • 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.
  • 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,
'cell' returns cell (see outputs, below),
'error' gives an error.
  • waitbar: [ 'off' |{'on'}] Governs display of a progress bar when doing multiple file reading.

See Also

Data Importing Formats, brukerxrpdreadr, jcampreadr, pereadr, spareadr, spcreadr, writespc, xclreadr