4.2. Wide-Field Slitless Spectroscopy
Wide-field slitless spectroscopy (WFSS) refers to either the complete, unbiased spectroscopic view of the sky by means of transmissive and dispersive optical element (usually a grism or prism) and/or the data produced by such an observation. This is to distinguish between other ways of using these optical elements, such as spatial/drift scanning, spectro-polarimetry, or detailed transient spectroscopy, which are not implemented in slitlessutils. It is unclear if/when such modes will be implemented.
Below the two main container datatypes that one generally interacts with are the WFSS() and WFSSCollection() to hold a single WFSS file/image and a set of such objects, respectively. Since some of the extraction techniques implemented in slitlessutils can be computationally expensive and/or use a significant amount of memory, care has been taken to limit the memory footprint of objects (for example, the image-objects do not instantiate the data until requested).
4.2.1. WFSS data (WFSS())
A light weight object that describes a single WFSS image. This object will emulate a dict-like object, where the keyword/value pairs are the detector name and a WFSSDetector() object, which is unlikely to be directly instantiated by a user. The WFSS() objects are generally instantiated by one of two classmethods:
simulated(): load a WFSS data structure for simulation (see WFSS Image Simulation (Simulate())).observed(): load a WFSS image as an observed file.
4.2.2. WFSS Collection (WFSSCollection())
While one can instantiate a single WFSS file using the above, it is generally more common to load many of the files as a collection, as a WFSSCollection() is the primary input to many of the additional functions/modules. The WFSSCollection() will act like a dict, where the keyword/value pairs are the dataset name and file-loading key. These keys are dataclass that are for loading observed and simulated data:
Observed Data (ObservedData())
To load observed fits files, there are three classmethods
from_glob(): Load an observedWFSSCollectionfrom a glob token.from_list(): Load an observedWFSSCollectionfrom a list of files.from_file(): Load an observedWFSSCollectionfrom an ascii file that contains the fullpath to a file (one per line).
Example
import slitlessutils as su
# load as a glob string
data1 = su.wfss.WFSSCollection.from_glob('*flt.fits')
# load from a list
filenames = ['file1_flt.fits', 'file2_flt.fits', 'file3_flt.fits']
data2 = su.wfss.WFSSCollection.from_list(filenames)
# load from an ascii file that contains filenames
data3 = su.wfss.WFSSCollection.from_file(filelist)
Simulated data (SimulatedData())
To load simulated fits files, there are two classmethods
from_dataframe(): Load a simulatedWFSSCollectionfrom a pandas.DataFrame(). The table shall have columns and datatypes given in Table 4.2.from_wcsfile(): Load a simulatedWFSSCollectionfrom a comma-separated value (CSV) file whose columns and datatypes are given in Table 4.2 and an example CSV file is shown below.
Keyword |
Datatype |
Notes |
|---|---|---|
dataset |
|
the file basename (ie. the IPPPSOOT for HST files) |
ra |
|
the right ascension of the instrument’s reference point (in degrees) |
dec |
|
the declination of the instrument’s reference point (in degrees) |
orientat |
|
the position angle of the instrument at its reference point (in degree) |
telescope |
|
the name of the telescope (e.g. |
instrument |
|
the tokenized name of the instrument (e.g. |
disperser |
|
the name of the dispersive optic (e.g. |
blocking |
|
the name of the blocking filter. For HST instruments, this is to be left blank,
or set to
None, but is reserved for future development to support JWSTinstruments or ACS spectro-polarimetry.
|
Example WCS File (in csv format)
dataset,ra,dec,orientat,telescope,instrument,disperser,blocking
a_starfield,53.0,-27.0,0.0,HST,ACSWFC,G800L,
b_starfield,53.0,-27.0,60.0,HST,ACSWFC,G800L,
c_starfield,53.0,-27.0,120.0,HST,ACSWFC,G800L,