Matlab Trace Format and Matlab Imaging Format: Difference between pages

From 2D-COS Wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
Matlab trace format files contain spectra series in a 2D data format where the first dimension is the spectral dimension and the second dimension represents the perturbing variable, i.e. time, pressure, temperature, spatial dimension, etc. <br>
Imaging data can be considered 3-way data in which the intensity (absorbance, transmittance, reflectance, etc.) depends on two spatial [x,y] variables and one spectral variable, usually represented by the wavelength, wavenumber, or Raman shift. <br> &nbsp; <br>


To load Matlab trace files select ''Load Data'' &rarr; ''Matlab trace format'' &rarr; ''x-data'', or ''y-data'' from the ''Load Data'' menu bar.
[[File:imaging-file-format-I.jpg|400px|thumb| Matlab structure arrays ''C'' (imaging data) and ''Minfo'' (metadata) present in imaging data files]]
<br> &nbsp; <br>


== Format of a 2D-COS trace file ==
To load imaging data in the Matlab data format select ''Load Data'' &rarr; ''Matlab imaging format'' &rarr; ''x-data'' or ''y-data'' to load the x-, or y-data from the ''Load Data'' menu bar. Matlab imaging data files may contain up to four different types of hyperspectral imaging data cubes: original (unprocessed data), pre-processed, derivative and so-called deconvolution data cubes (the latter 3 types of data must be derived from the original spectral data). For a detailed description of the Matlab imaging data format see [http://www.cytospec.com/file.php#FileSaveMatlab].


[[File:trace-file-format.jpg|400px|thumb|Variables present in a Matlab trace file]]
[[File:imaging-file-format-II.jpg|400px|thumb| Fields of the Matlab structure array ''Minfo'' containing important metadata of hyperspectral imaging data files]]
 
Matlab trace files contain five different variables to store the spectral data as well as relevant metadata:<br>
* ''spc'' – this variable contains the spectral data, a 2D array of double precision floating point values (float32). Columns indicate individual spectra of absorbance, intensity, transmittance, etc. values. The column length indicates the number of data points per spectrum. The number of columns is equal to the number of observations i.e. the number of spectra.
* ''tos'' - A character vector of variable length which indicates the type of spectra. Examples are ''Transmission'', ''Fluorescence'', ''Raman'', etc.
* ''vst'' - A character vector of variable length indicating the type of the perturbing variable. Examples of vst: ''Temperature'', ''Time'', ''Voltage'', ''Pressure'', or ''Spatial variable''.
* ''war'' - A vector of float32 values with the perturbing variable: ''temperature'', ''time'', ''voltage'', ''pressure'', etc. The length of ''war'' must be equal to size(spc,2).
* ''wav'' - A vector of float32 values, the ''wavenumber'' vector, or more general the vector of y-values (frequencies, wavenumbers, Raman shift. wavelength, or alternative variables). The length of ''wav'' must equal the number of data points per spectrum, i.e. size(wav,1) == size(spc,1). Equidistancy of the 'wav' vector is not a requirement.


== Related links  ==
== Related links  ==


* [[Matlab_Imaging_Format|Import data in the imaging format (Matlab)]]
* [[Matlab_Trace_Format|Import data in the trace format (Matlab)]]
* [[Excel_Trace_Format|Import data in the MS Excel data format]]
* [[Excel_Trace_Format|Import data in the MS Excel data format]]
* [[Format_of_a_2D-COS_Result_File|Format of a 2D-COS result file (Matlab)]]
* [[Format_of_a_2D-COS_Result_File|Format of a 2D-COS result file (Matlab)]]

Latest revision as of 16:59, 2 April 2023

Imaging data can be considered 3-way data in which the intensity (absorbance, transmittance, reflectance, etc.) depends on two spatial [x,y] variables and one spectral variable, usually represented by the wavelength, wavenumber, or Raman shift.
 

Matlab structure arrays C (imaging data) and Minfo (metadata) present in imaging data files

To load imaging data in the Matlab data format select Load DataMatlab imaging formatx-data or y-data to load the x-, or y-data from the Load Data menu bar. Matlab imaging data files may contain up to four different types of hyperspectral imaging data cubes: original (unprocessed data), pre-processed, derivative and so-called deconvolution data cubes (the latter 3 types of data must be derived from the original spectral data). For a detailed description of the Matlab imaging data format see [1].

Fields of the Matlab structure array Minfo containing important metadata of hyperspectral imaging data files

Related links