Page 1 of 1

Importing artificial mass spectrum to chemstation

Posted: Wed May 15, 2013 8:36 am
by stoooorm88
Hi everyone,

i've written a macro in chemstation to identify compounds in a given GC-MS dataset. In order to test my macro I would like to create an artificial dataset (chromatogram) with Matlab and import it in chemstation. My chemstation software has the function "Import AIA RAW DATA FILES" which imports .cdf files. Matlab has a "cdfwrite" command to create cdf-files. So I think it should be possible. The only question is: How is the cdf-file structured? There needs to be at least the time (or framenumber), masses, and the MS-measurement (matrix?). Anybody here who could help me with this? The file format is certainly documented somewhere but up to now I wasn't able to find it.

Thanks

Re: Importing artificial mass spectrum to chemstation

Posted: Thu May 16, 2013 6:38 am
by stoooorm88
Just in case that someone else wants to produce "test-measurements" for chemstation with matlab, here is how i made it:

1. Export an existing real measurement from chemstation with "Export DATA to AIA Format". This will produce a .cdf file (In this case a netcdf-file).
2. To see the structure of the file in matlab use the command "ncdisp"
3. To read in variables of the file in matlab use "ncread"
4. To write data (e.g. your artificial test-measurement) into variables of the file use "ncwrite"

So you export a measurement and use it as container-file in which you write your data with matlab. In the next step you reimport the modified file to chemstation. Et voilĂ .