Jcampreadr: Difference between revisions

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


:data = jcampreadr('filename.dx',''options'')
:data = jcampreadr(filename,''options'')


===Description===
===Description===
Line 27: Line 27:


====Optional Inputs====
====Optional Inputs====
*'''fname''' = specifies the file(s) to read using:
*'''filename''' = specifies the file(s) to read using:
::'''(a)''' a string specifying a single file to read
::'''(a)''' a string specifying a single file to read
::'''(b)''' a cell array of strings specifying multiple files to read
::'''(b)''' a cell array of strings specifying multiple files to read

Revision as of 12:18, 6 March 2013

Purpose

Reads a JCAMP file into a DataSet object.

Synopsis

data = jcampreadr(filename,options)

Description

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

ND NMR SPECTRUM,
NMR SPECTRUM,
INFRARED SPECTRUM,
MASS SPECTRUM,
RAMAN SPECTRUM,
GAS CHROMATOGRAM,
UV/VIS SPECTRUM.

including any files written in JCAMP-DX format (with limited support for beta version 6).

This importer uses JSpecView, a Java package which enables importing of files written the JCAMP-DX format. JSpecView was developed at the Department of Chemistry of the University of the West Indies, Mona, Jamaica, WI. JSpecView is described in an article available at:JSpecView.

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 (or an empty array if no data could be read)
  • wrn = a cell array of warnings issued during the reading of the file.

Options

Input 'options' is an options structure containing the following fields

  • display: [{'off'}| 'on' ] Governs display to the command line. Warnings encountered during file load will be supressed if display is 'off'.
  • waitbar: [ 'off' |{'on'}] Governs display of a progress bar when doing multiple file reading.

See Also

spcreadr, xclreadr