Abbspectrumreadr

From Eigenvector Research Documentation Wiki
Revision as of 10:30, 25 September 2024 by Lyle (talk | contribs) (Created page with "===Purpose=== Reads a ABB spectrum file. ===Synopsis=== :data = abbspectrumreadr(filename,options) ===Description=== Reads a SPECTRUM file into a DataSet object. If the filename input is omitted, the user is prompted for a file. This importer uses Python source code provided by ABB. The imported files are returned in a DataSet object or a cell array if they have differing variable axis scales or number of variables, and the <code>nonmatching</code> option is set to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

Reads a ABB spectrum file.

Synopsis

data = abbspectrumreadr(filename,options)

Description

Reads a SPECTRUM file into a DataSet object. If the filename input is omitted, the user is prompted for a file. This importer uses Python source code provided by ABB. The imported files are returned in a DataSet object or a cell array if they have differing variable axis scales or number of variables, and the nonmatching option is set to 'cell'.

Inputs

  • filename = a text string specifying the file to read or a cell array of strings specifying multiple files to read, or the output of the MATLAB DIR command specifying one or more files to read. If (filename) is empty or not supplied, the user is prompted to identify files to load.

Outputs

  • data = 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 cell array with a dataset object for each input file if the 'nonmatching' option has value 'cell', or
    • a dataset object containing the input data combined using the MATCHVARS function if the 'nonmatching' option has value 'matchvars'.

Options

options = an options structure containing 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. The options are:
    • 'matchvars' uses MATCHVARS to merge imported spectra when the spectral x-axes differ and returns a dataset object,
    • 'cell' returns cell array,
    • 'error' gives an error
  • display: [ {'off'} | 'on' ] Governs display to the command line. Warnings encountered during file load will be suppressed if display is 'off'.
  • waitbar: [ 'off' | {'on'} ] Governs display of wait bar when doing multiple file reading.

See Also

Data Importing Formats, jcampreadr, writespc, xclreadr