SpectraContainer#

class madcubapy.io.SpectraContainer(bintable=None, hist=None, filename=None)[source]#

Bases: MadcubaFits

A container for MADCUBA spectra, using the MadcubaFits interface.

This class is basically a wrapper to read MADCUBA exported spectra and their history files with astropy.

Parameters:
bintableTable

Table containing the data of every spectra inside the .spec file alongside the info of their headers.

histTable

Table containing the history information of the FITS file, which is stored in a separate _hist.csv file.

filenamestr

Name of the .spec file.

Methods

add_hist(*args)

Load the history table from a csv file.

Attributes Summary

bintable

Table : Table containing the data of every spectra inside the .spec file.

filename

str : Name of the .spec file.

hist

Table : Table containing the history information.

Methods Summary

add_hist(filename)

Load the history table from a csv file.

copy()

Create a copy of the SpectraContainer.

read(filepath)

Classmethod to generate a SpectraContainer from a .spec file.

Attributes Documentation

bintable#

Table : Table containing the data of every spectra inside the .spec file.

filename#

str : Name of the .spec file.

hist#

Table : Table containing the history information.

Methods Documentation

add_hist(filename)#

Load the history table from a csv file.

Parameters:
filenamestr or Path

Path of the history csv file.

copy()[source]#

Create a copy of the SpectraContainer.

classmethod read(filepath)[source]#

Classmethod to generate a SpectraContainer from a .spec file.

Parameters:
filepathstr

Name of spec file.