scopesim.effects.spectral_trace_list module¶
Effect for mapping spectral cubes to the detector plane
The Effect is called SpectralTraceList, it applies a list of optics.spectral_trace_SpectralTrace objects to a FieldOfView.
- class scopesim.effects.spectral_trace_list.SpectralTraceList(**kwargs)[source]¶
Bases:
Effect
List of spectral trace geometries for the detector plane
Should work in concert with an ApertureList (or ApertureMask) object and a DetectorList object
Spectral trace patterns are to be kept in a
fits.HDUList
with one or morefits.BinTableHDU
extensions, each one describing the geometry of a single trace. The first extension should be aBinTableHDU
connecting the traces to the correctAperture
andImagePlane
objects.The
fits.HDUList
objects can be loaded using one of these two keywords:filename
: for on disk FITS files, orhdulist
: for in-memoryfits.HDUList
objects
The format and contents of the extensions in the HDUList (FITS file) object is listed below
- apply_to(obj, **kwargs)[source]¶
Interface between FieldOfView and SpectralTraceList
This is called twice: 1. During setup of the required FieldOfView objects, the SpectralTraceList is asked for the source space volumes that it requires (spatial limits and wavelength limits). 2. During “observation” the method is passed a single FieldOfView object and applies the mapping to the image plane to it. The FieldOfView object is associated to one SpectralTrace from the list, identified by meta[‘trace_id’].
- property footprint¶
Return the footprint of the entire SpectralTraceList
- property image_plane_header¶
- class scopesim.effects.spectral_trace_list.SpectralTraceListWheel(**kwargs)[source]¶
Bases:
Effect
A Wheel-Effect object for selecting between multiple gratings/grisms
See
SpectralTraceList
for the trace file format description.- Parameters:
- trace_list_nameslist
The list of unique identifiers in the trace filenames
- filename_formatstr
f-string
that directs scopesim to the folder containing the trace files. This can be a!-string
if the trace names are shared with other*Wheel
effect objects (e.g. aFilterWheel
). See examples.- current_trace_liststr
default trace file to use
- kwargskey-value pairs
Addition keywords that are passed to the
SpectralTraceList
objects See SpectralTraceList docstring
Examples
A simplified YAML file example taken from the OSIRIS instrument package:
alias: INST name: OSIRIS_LSS properties: decouple_detector_from_sky_headers: True grism_names: - R300B - R500B - R1000B - R2500V effects: - name: spectral_trace_wheel description: grism wheel contining spectral trace geometries class: SpectralTraceListWheel kwargs: current_trace_list: "!OBS.grating_name" filename_format: "traces/LSS_{}_TRACE.fits" trace_list_names: "!INST.grism_names" - name: grating_efficiency description: OSIRIS grating efficiency curves, piggybacking on FilterWheel class: FilterWheel kwargs: minimum_throughput: !!float 0. filename_format: "gratings/{}.txt" current_filter: "!OBS.grating_name" filter_names: "!INST.grism_names"
- property current_trace_list¶
- property display_name¶