pypeit.spectrographs.p200_dbsp module
Module for P200/DBSP specific methods.
- class pypeit.spectrographs.p200_dbsp.P200DBSPBlueSpectrograph[source]
Bases:
P200DBSPSpectrograph
Child to handle P200/DBSP blue specific code
- camera = 'DBSPb'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- comment = 'Blue camera'
A brief comment or description regarding PypeIt usage with this spectrograph.
- compound_meta(headarr: List[Header], meta_key: str)[source]
Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.
- Parameters:
headarr (
list
) – List of astropy.io.fits.Header objects.meta_key (
str
) – Metadata keyword to construct.
- Returns:
Metadata value read from the header(s).
- Return type:
- 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, usedefault_pypeit_par()
.
- Returns:
The PypeIt parameter set adjusted for configuration specific parameter values.
- Return type:
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- get_detector_par(det: int, hdu: HDUList | None = None)[source]
Return metadata for the selected detector.
Warning
Many of the necessary detector parameters are read from the file header, meaning the
hdu
argument is effectively required for P200/DBSPb. The optional use ofhdu
is only viable for automatically generated documentation.- 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:
- header_name = 'DBSP_BLUE'
Name of the spectrograph camera or arm from the Header. Usually the INSTRUME card.
- name = 'p200_dbsp_blue'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- 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.
- class pypeit.spectrographs.p200_dbsp.P200DBSPRedSpectrograph[source]
Bases:
P200DBSPSpectrograph
Child to handle P200/DBSPr red specific code
- bpm(filename, det, shape=None, msbias=None)[source]
Override parent bpm function with BPM specific to P200 DBSPr.
- Parameters:
det (int) – Detector number
msbias (numpy.ndarray) – Processed bias frame used when constructing the bpm (see
bpm_frombias()
)
- Returns:
bpix – 0 = ok; 1 = Mask
- Return type:
ndarray
- camera = 'DBSPr'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- comment = 'Red camera'
A brief comment or description regarding PypeIt usage with this spectrograph.
- compound_meta(headarr: List[Header], meta_key: str)[source]
Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.
- Parameters:
headarr (
list
) – List of astropy.io.fits.Header objects.meta_key (
str
) – Metadata keyword to construct.
- Returns:
Metadata value read from the header(s).
- Return type:
- 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, usedefault_pypeit_par()
.
- Returns:
The PypeIt parameter set adjusted for configuration specific parameter values.
- Return type:
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- get_detector_par(det: int, hdu: HDUList | None = None)[source]
Return metadata for the selected detector.
Warning
Many of the necessary detector parameters are read from the file header, meaning the
hdu
argument is effectively required for P200/DBSPr. The optional use ofhdu
is only viable for automatically generated documentation.- 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:
- header_name = 'DBSP_RED2'
Name of the spectrograph camera or arm from the Header. Usually the INSTRUME card.
- name = 'p200_dbsp_red'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- 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.
- class pypeit.spectrographs.p200_dbsp.P200DBSPSpectrograph[source]
Bases:
Spectrograph
Child to handle P200/DBSP specific code
- check_frame_type(ftype, fitstbl, exprng=None)[source]
Check for frames of the provided type.
- Parameters:
ftype (
str
) – Type of frame to check. Must be a valid frame type; see frame-type Definitions.fitstbl (astropy.table.Table) – The table with the metadata for one or more frames to check.
exprng (
list
, optional) – Range in the allowed exposure time for a frame of typeftype
. Seepypeit.core.framematch.check_frame_exptime()
.
- Returns:
Boolean array with the flags selecting the exposures in
fitstbl
that areftype
type frames.- Return type:
- compound_meta(headarr: List[Header], meta_key: str)[source]
Methods to generate metadata requiring interpretation of the header data, instead of simply reading the value of a header card.
- Parameters:
headarr (
list
) – List of astropy.io.fits.Header objects.meta_key (
str
) – Metadata keyword to construct.
- Returns:
Metadata value read from the header(s).
- Return type:
- 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 constuct the
PypeItMetaData
object.- Return type:
- get_rawimage(raw_file, det)[source]
Read raw spectrograph image files and return data and relevant metadata needed for image processing.
For P200/DBSP, the
DATASEC
andOSCANSEC
regions are read directly from the file header and are automatically adjusted to account for the on-chip binning. This is a simple wrapper forpypeit.spectrographs.spectrograph.Spectrograph.get_rawimage()
that setssec_includes_binning
to True. See the base-class function for the detailed descriptions of the input parameters and returned objects.
- 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
.
- ndet = 1
Number of detectors for this instrument.
- pypeit_file_keys()[source]
Define the list of keys to be output into a standard PypeIt file.
- Returns:
The list of keywords in the relevant
PypeItMetaData
instance to print to the PypeIt Reduction File.- Return type:
- raw_header_cards()[source]
Return additional raw header cards to be propagated in downstream output files for configuration identification.
The list of raw data FITS keywords should be those used to populate the
configuration_keys()
or are used inconfig_specific_par()
for a particular spectrograph, if different from the name of the PypeIt metadata keyword.This list is used by
subheader_for_spec()
to include additional FITS keywords in downstream output files.- Returns:
List of keywords from the raw data files that should be propagated in output files.
- Return type:
- telescope = Parameter Value Default Type Callable ---------------------------------------------------------------- name P200 KECK str False longitude -116.86300000000003 None int, float False latitude 33.35600000000001 None int, float False elevation 1705.999999999058 None int, float False fratio None None int, float False diameter 5.1 None int, float False eff_aperture None None int, float False
Instance of
TelescopePar
providing telescope-specific metadata.
- url = 'https://sites.astro.caltech.edu/palomar/observer/200inchResources/dbspoverview.html'
Reference url