pypeit.sensfilearchive module

Provides a class that handles archived sensfunc files.

class pypeit.sensfilearchive.DEIMOSSensFileArchive[source]

Bases: SensFileArchive

SensFileArchive subclass specifically for keck_deimos SensFuncs.

_abc_impl = <_abc._abc_data object>
get_archived_sensfile(fitsfile, symlink_in_pkgdir=False)[source]

Get the full path name of the archived sens file that can be used to flux calibrate a given fitsfile

Parameters:
  • fitsfile (str) – The fitsfile to find an archived SensFunc file for.

  • symlink_in_pkgdir (bool) – Create a symlink to the the cached file in the package directory (default False)

Returns:

The full pathname of the archived SensFunc.

Return type:

str

Raises:

PypeItError – Raised an archived SensFunc file can’t be found for the given fits file.

spec_name = 'keck_deimos'
class pypeit.sensfilearchive.SensFileArchive[source]

Bases: ABC

Class for managing archived SensFunc files. This is an abstract class that instantitates child classes based on spectrograph.

_abc_impl = <_abc._abc_data object>
abstract get_archived_sensfile(fitsfile)[source]

Get the full path name of the archived sens file that can be used to flux calibrate a given fitsfile

Parameters:

fitsfile (str) – The fitsfile to find an archived SensFunc file for.

Returns:

The full pathname of the archived SensFunc.

Return type:

str

Raises:

PypeItError – Raised an archived SensFunc file can’t be found for the given fits file.

classmethod get_instance(spectrograph_name)[source]

Return a SensFuncArchive instance that will find archived SensFuncs for a specific spectrograph.

Parameters:

spectrograph_name (str) – The spectrograph name for the SensFuncArchive instance to return.

Returns:

A SensFuncArchive object to find archived sensfuncs for a specific spectrograph.

Return type:

pypeit.sensfilearchive.SensFileArchive

Raises:

ValueError – Raised if the passed in spectrograph is not supported.

classmethod supported_spectrographs()[source]

Return which spectrograph names support Archived SensFuncs.

Return: list of str