parse_general¶
- sofia_redux.visualization.models.model.parse_general(filename: str) HDUList [source]¶
Parse a text-based data file.
Data is converted into a FITS-style HDUList for further handling.
Based on the number of columns in this dataset, it is parsed accordingly. If column labels have been provided, it uses them, otherwise, it assumes a general order of [wavelength, flux, error, transmission, response] for the columns.
- Parameters:
- filenamestr
Absolute path to the non-FITS file to read and parse.
- Returns:
- hdul_read‘astropy.io.fits.HDUList’
An astropy HDUList
- Raises:
- RuntimeError
If invalid file is passed or invalid columns in the file.