Jcampreadr
Contents |
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. If the file contains peaktable(s) they are extracted and stored in the returned DataSet's userdata field.
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. If the input file(s) contain any peaktables these are extracted and returned in the output DataSet object's userdata field.
- 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.