pypeit.spectrographs.magellan_ldss3 module

Module for Magellan/LDSS3 specific codes

class pypeit.spectrographs.magellan_ldss3.MagellanLDSS3Spectrograph[source]

Bases: Spectrograph

Child to handle Magellan/LDSS3 specific code

camera = 'LDSS3'

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

comment = 'Longslit only (so far)'

A brief comment or description regarding PypeIt usage with this spectrograph.

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_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 metadata keys that define a unique instrument configuration.

This list is used by PypeItMetaData to identify the unique configurations among the list of frames read for a given reduction.

Returns:

List of keywords of data pulled from file headers and used to construct the PypeItMetaData object.

Return type:

list

default_pypeit_par()[source]

Return the default parameters to use for this instrument.

Returns:

Parameters required by all of PypeIt methods.

Return type:

PypeItPar

get_detector_par(det, hdu=None)[source]

Return metadata for the selected detector.

Parameters:
Returns:

Object with the detector metadata.

Return type:

DetectorContainer

get_rawimage(raw_file, det)[source]

Read raw images and generate a few other bits and pieces that are key for image processing.

Parameters:
  • raw_file (str) – File to read

  • det (int) – 1-indexed detector to read

Returns:

  • detector_par (pypeit.images.detector_container.DetectorContainer) – Detector metadata parameters.

  • raw_img (numpy.ndarray) – Raw image for this detector.

  • hdu (astropy.io.fits.HDUList) – Opened fits file

  • exptime (float) – Exposure time read from the file header

  • rawdatasec_img (numpy.ndarray) – Data (Science) section of the detector as provided by setting the (1-indexed) number of the amplifier used to read each detector pixel. Pixels unassociated with any amplifier are set to 0.

  • oscansec_img (numpy.ndarray) – Overscan section of the detector as provided by setting the (1-indexed) number of the amplifier used to read each detector pixel. Pixels unassociated with any amplifier are set to 0.

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.

name = 'magellan_ldss3'

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

ndet = 1

Number of detectors for this instrument.

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          MMT                  KECK     str         False    longitude     -110.87750000000003  None     int, float  False    latitude      31.68094444444444    None     int, float  False    elevation     2319.9999999995903   None     int, float  False    fratio        None                 None     int, float  False    diameter      6.5                  None     int, float  False    eff_aperture  None                 None     int, float  False   

Instance of TelescopePar providing telescope-specific metadata.

pypeit.spectrographs.magellan_ldss3.ldss3_read_amp(fil)[source]

Read a single amp of LDSS3 data

Parameters:

fil (str) – filename

Returns:

data, overscan, datasec, biassec, x1, x2, nxb

Return type:

tuple