spyfit.io.sfit4.read_spectrum¶
-
spyfit.io.sfit4.
read_spectrum
(filename, spdim='spectrum', bdim='band', sdim='scan', wcoord='spec_wn', scoord='spec_scan', bcoord='spec_band')¶ Read a spectrum (bands and scans data).
Use this function to load ‘in.spectrum’.
Parameters: filename : str
Name or path to the file.
spdim : str
Name of the dimension of the spectral data (default: ‘spectra’). spectral data for all micro-windows (i.e., bands and scans) will be flattened as a 1-d array.
wcoord : str
Name of the wavenumber coordinate for spectral data (default: ‘spec_wn’).
scoord : str
Name of the coordinate for spectral scans (default: ‘spec_scan’).
bcoord : str
Name of the coordinate for spectral bands (default: ‘spec_band’).
bdim : str
Name of the dimension of the band (default: ‘band’).
sdim : str
Name of the dimension of the scan (default: ‘scan’).
Returns: dataset : dict
A CDM-structured dictionary.