spyfit.io.sfit4.read_single_spectra¶
-
spyfit.io.sfit4.
read_single_spectra
(filename, spdim='spectrum', idim='iteration', wcoord='spec_wn', scoord='spec_scan', bcoord='spec_band')¶ Read single spectra in a SFIT4 output ascii files.
Read one or more spectra that are each stored in a single file, i.e., for a given gas, band, scan and at a given iteration.
Use this function to load all ‘out.gas_spectra’ files at once.
Parameters: filename : str
Name or path to the file(s). Support UNIX-like file specification (e.g., using ‘*’ to specify all files that match a given pattern).
spdim : str
Name of the dimension of the spectral data (default: ‘spectrum’). spectral data or coordinates for all fitted micro-windows (i.e., bands and scans) will be flattened as a 1-d array.
idim : str
Name of the dimension of the iterations (default: ‘iteration’).
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’).
Returns: dataset : dict
A CDM-structured dictionary.