Main Content

mzcdfinfo

Return information about netCDF file containing mass spectrometry data

Syntax

InfoStruct = mzcdfinfo(File)

Input Arguments

File

Character vector or string containing a file name, or a path and file name, of a netCDF file that contains mass spectrometry data and conforms to the ANDI/MS or the ASTM E2077-00 (2005) standard specification or earlier specifications.

If you specify only a file name, that file must be on the MATLAB® search path or in the current folder.

Output Arguments

InfoStruct

MATLAB structure containing information from a netCDF file. It includes the fields in the following table.

Description

InfoStruct = mzcdfinfo(File) returns a MATLAB structure, InfoStruct, containing summary information about a netCDF file, File.

File is a character vector or string containing a file name, or a path and file name, of a netCDF file that contains mass spectrometry data. The file must conform to the ANDI/MS or the ASTM E2077-00 (2005) standard specification or earlier specifications.

InfoStruct includes the following fields.

FieldDescription
Filename

Name of the netCDF file.

FileTimeStamp

Date time stamp of the netCDF file.

FileSize

Size of the file in bytes.

NumberOfScans

Number of scans in the file.

StartTime

Run start time.

EndTime

Run end time.

TimeUnits

Units for time.

GlobalMassMin

Minimum m/z value in all scans.

GlobalMassMax

Maximum m/z value in all scans.

GlobalIntensityMin

Minimum intensity value in all scans.

GlobalIntensityMax

Maximum intensity value in all scans.

ExperimentType

Indicates if data is raw or centroided.

Note

If any of the associated attributes are not in the netCDF file (because they are optional in the specifications), the value for that field will be set to N/A or NaN.

Examples

In the following example, the file results.cdf is not provided.

Return a MATLAB structure containing summary information about a netCDF file.

info = mzcdfinfo('results.cdf')

info = 

              Filename: 'results.cdf'
         FileTimeStamp: '19930703134354-700'
              FileSize: 339892
         NumberOfScans: 4
             StartTime: 8.3430
               EndTime: 21.1530
             TimeUnits: 'N/A'
         GlobalMassMin: 399.9990
         GlobalMassMax: 1.8000e+003
    GlobalIntensityMin: NaN
    GlobalIntensityMax: NaN
        ExperimentType: 'Continuum Mass Spectrum'

Version History

Introduced in R2008b

See Also