specdash.input package

Module contents

class specdash.input.DataDriver[source]

Bases: abc.ABC

b = '\n @classmethod\n @abstractmethod\n def get_mask_description_list(cls) -> list:\n """List of mask bit descriptions.\n Each description is in turn a list of the format [mask_name (string), mask_bit (integer), description (string)]"""\n pass\n'
classmethod get_base_data_directory()[source]
abstract classmethod get_catalog_name() → str[source]

Gets the name of the catalog which the driver is processing data for. E.g., SDSS

abstract classmethod get_data_from_specid(specid: str, trace_name: str) → tuple[source]
classmethod get_mask_info(trace_name, mask_array, mask_bits)[source]
abstract classmethod get_spectrum_path(specid) → str[source]

returns a non empty string if specid is found in file system. Else, returns an empty string or None

abstract classmethod get_trace_list_from_fits(name: str, hdulist: list, file_object: object) → list[source]
abstract classmethod is_file_from_catalog(hdulist: list) → bool[source]

returns True if the file’s HDLUList can be identified as belonging to this catalog. False otherwise

classmethod is_safe_path(path)[source]
abstract classmethod is_specid_from_catalog(specid: str) → bool[source]

returns True if the file’s HDLUList can be identified as belonging to this catalog. False otherwise

specdash.input.check_base_data_directories()[source]
specdash.input.get_spectrum_path(specid)[source]
specdash.input.get_supported_catalogs()[source]
specdash.input.load_data_from_file(trace_name, catalog_name, decoded_bytes=None, file_path=None)[source]
specdash.input.load_data_from_specid(specid, trace_name=None, catalog_name=None)[source]