pypeit.spectrographs.apf_levy module

Implements APF-specific functions

class pypeit.spectrographs.apf_levy.APFLevySpectrograph[source]

Bases: Spectrograph

Child to handle APF specific code.

This spectrograph is partially supported. The data will be reduced but it will require some user intervention by editing the pypeit file.

camera = 'apf'

Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention

check_frame_type(ftype, fitstbl, exprng=None)[source]

Check for frames of the provided type.

Parameters:
Returns:

Boolean array with the flags selecting the exposures in fitstbl that are ftype type frames.

Return type:

numpy.ndarray

compound_meta(headarr, meta_key)[source]

Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.

Parameters:
Returns:

Metadata value read from the header(s).

Return type:

object

config_independent_frames()[source]

Define frame types that are independent of the fully defined instrument configuration.

This method returns a dictionary where the keys of the dictionary are the list of configuration-independent frame types. The value of each dictionary element can be set to one or more metadata keys that can be used to assign each frame type to a given configuration group. See set_configurations() and how it interprets the dictionary values, which can be None.

Returns:

Dictionary where the keys are the frame types that are configuration-independent and the values are the metadata keywords that can be used to assign the frames to a configuration group.

Return type:

dict

config_specific_par(scifile, inp_par=None)[source]

Modify the PypeIt parameters to hard-wired values used for specific instrument configurations.

Parameters:
  • scifile (str) – File to use when determining the configuration and how to adjust the input parameters.

  • inp_par (ParSet, optional) – Parameter set used for the full run of PypeIt. If None, use default_pypeit_par().

Returns:

The PypeIt parameter set adjusted for configuration specific parameter values.

Return type:

ParSet

configuration_keys()[source]

Return the default parameters to use for this instrument.

Returns:

Parameters required by all of PypeIt methods.

Return type:

PypeItPar

classmethod default_pypeit_par()[source]

Return the default parameters to use for this instrument.

Returns:

Parameters required by all of PypeIt methods.

Return type:

PypeItPar

ech_fixed_format = True

If an echelle spectrograph, this will be set to a boolean indicating whether it is a fixed format or tiltable echelle.

get_detector_par(det, hdu=None)[source]

Return metadata for the selected detector.

Parameters:
  • det (int) – 1-indexed detector number.

  • hdu (astropy.io.fits.HDUList, optional) – The open fits file with the raw image of interest. If not provided, frame-dependent parameters are set to a default.

Returns:

Object with the detector metadata.

Return type:

DetectorContainer

get_rawimage(raw_file, det, sec_includes_binning=True)[source]

Read the image

header_name = 'apf'

Name of the spectrograph camera or arm from the Header. Usually the INSTRUME card.

init_meta()[source]

Define how metadata are derived from the spectrograph files.

That is, this associates the PypeIt-specific metadata keywords with the instrument-specific header cards using meta.

is_science(fitstbl)[source]

Return a boolean array selecting science frames.

name = 'apf_levy'

The name of the spectrograph. See Spectrographs for the currently supported spectrographs.

ndet = 1

Number of detectors for this instrument.

property norders

Number of orders for this spectograph. Should only defined for echelle spectrographs, and it is undefined for the base class.

order_platescale(order_vec, binning=None)[source]

Return the platescale for each echelle order.

This routine is only defined for echelle spectrographs, and it is undefined in the base class.

Parameters:
  • order_vec (numpy.ndarray) – The vector providing the order numbers.

  • binning (str, optional) – The string defining the spectral and spatial binning.

Returns:

An array with the platescale for each order provided by order.

Return type:

numpy.ndarray

property order_spat_pos

Return the expected spatial position of each echelle order.

property orders

Return the order number for each echelle order.

pypeline = 'Echelle'

String used to select the general pipeline approach for this spectrograph.

supported = True

Flag that PypeIt code base has been sufficiently tested with data from this spectrograph that it is officially supported by the development team.

telescope = Parameter     Value                Default  Type        Callable ---------------------------------------------------------------- name          APF                  KECK     str         False    longitude     -121.63666666666666  None     int, float  False    latitude      37.34333333333334    None     int, float  False    elevation     1290.0000000004732   None     int, float  False    fratio        None                 None     int, float  False    diameter      2.4                  None     int, float  False    eff_aperture  None                 None     int, float  False   

Instance of TelescopePar providing telescope-specific metadata.