pypeit.spectrographs.shane_kast module
Module for Shane/Kast specific methods.
- class pypeit.spectrographs.shane_kast.ShaneKastBlueSpectrograph[source]
Bases:
ShaneKastSpectrograph
Child to handle Shane/Kast blue specific code
- camera = 'KASTb'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- 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, 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:
- header_name = 'kastb'
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
.
- name = 'shane_kast_blue'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- 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:
- 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.shane_kast.ShaneKastRedRetSpectrograph[source]
Bases:
ShaneKastSpectrograph
Child to handle Shane/Kast red specific code
- camera = 'KASTr'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- comment = 'Red reticon'
A brief comment or description regarding PypeIt usage with this spectrograph.
- 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, 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:
- header_name = 'kastr'
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
.
- name = 'shane_kast_red_ret'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- 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:
- 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.shane_kast.ShaneKastRedSpectrograph[source]
Bases:
ShaneKastSpectrograph
Child to handle Shane/Kast red specific code
- camera = 'KASTr'
Name of the spectrograph camera or arm. This is used by specdb, so use that naming convention
- config_specific_par(scifile, inp_par=None)[source]
Modify the PypeIt parameters to hard-wired values used for specific instrument configurations.
Todo
Document the changes made!
- Parameters:
scifile (str) – File to use when determining the configuration and how to adjust the input parameters.
inp_par (
pypeit.par.parset.ParSet
, optional) – Parameter set used for the full run of PypeIt. If None, usedefault_pypeit_par()
.
- Returns:
The PypeIt paramter set adjusted for configuration specific parameter values.
- 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:
- 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, hdu=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 Shane/KASTr. 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 = 'kastr'
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
.
- name = 'shane_kast_red'
The name of the spectrograph. See Spectrographs for the currently supported spectrographs.
- 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:
- 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.
- tweak_standard(wave_in, counts_in, counts_ivar_in, gpm_in, meta_table, log10_blaze_function=None)[source]
This routine is for performing instrument/disperser specific tweaks to standard stars so that sensitivity function fits will be well behaved. For example, masking second order light. For instruments that don’t require such tweaks it will just return the inputs, but for isntruments that do this function is overloaded with a method that performs the tweaks.
- Parameters:
wave_in (numpy.ndarray) – Input standard star wavelengths (
float
,shape = (nspec,)
)counts_in (numpy.ndarray) – Input standard star counts (
float
,shape = (nspec,)
)counts_ivar_in (numpy.ndarray) – Input inverse variance of standard star counts (
float
,shape = (nspec,)
)gpm_in (numpy.ndarray) – Input good pixel mask for standard (
bool
,shape = (nspec,)
)meta_table (
dict
) – Table containing meta data that is slupred from theSpecObjs
object. Seeunpack_object()
for the contents of this table.log10_blaze_function (numpy.ndarray or None) – Input blaze function to be tweaked, optional. Default=None.
- Returns:
wave_out (numpy.ndarray) – Output standard star wavelengths (
float
,shape = (nspec,)
)counts_out (numpy.ndarray) – Output standard star counts (
float
,shape = (nspec,)
)counts_ivar_out (numpy.ndarray) – Output inverse variance of standard star counts (
float
,shape = (nspec,)
)gpm_out (numpy.ndarray) – Output good pixel mask for standard (
bool
,shape = (nspec,)
)log10_blaze_function_out (numpy.ndarray or None) – Output blaze function after being tweaked.
- class pypeit.spectrographs.shane_kast.ShaneKastSpectrograph[source]
Bases:
Spectrograph
Child to handle Shane/Kast 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, meta_key)[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:
- classmethod default_pypeit_par()[source]
Return the default parameters to use for this instrument.
- Returns:
Parameters required by all of PypeIt methods.
- Return type:
- 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
.
- lamps(fitstbl, status)[source]
Check the lamp status.
- Parameters:
fitstbl (astropy.table.Table) – The table with the fits header meta data.
status (
str
) – The status to check. Can be'off'
,'arcs'
, or'dome'
.
- Returns:
A boolean array selecting fits files that meet the selected lamp status.
- Return type:
- Raises:
ValueError – Raised if the status is not one of the valid options.
- ndet = 1
Number of detectors for this instrument.
- ql_supported = True
Flag that PypeIt code base has been sufficiently tested with data from this spectrograph in quicklook mode that it is officially supported by the development team.
- telescope = Parameter Value Default Type Callable ---------------------------------------------------------------- name SHANE 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 3.05 None int, float False eff_aperture 6.3617 None int, float False
Instance of
TelescopePar
providing telescope-specific metadata.
- url = 'http://mthamilton.ucolick.org/techdocs/instruments/kast/'
Reference url