scopesim.effects.apertures module¶
Effects related to field masks, including spectroscopic slits.
- class scopesim.effects.apertures.ApertureList(**kwargs)[source]¶
Bases:
Effect
A list of apertures, useful for IFU or MOS instruments.
- Parameters:
- property apertures¶
- class scopesim.effects.apertures.ApertureMask(**kwargs)[source]¶
Bases:
Effect
Only provides the on-sky window coords of the Aperture.
- Case: Imaging
Covers the whole FOV of the detector
Round (with mask), square (without mask)
- CaseLS Spec
Covers the slit FOV
Polygonal (with mask), square (without mask)
- CaseIFU Spec
Covers the on-sky FOV of one slice of the IFU
Square (without mask)
- CaseMOS Spec
Covers a single MOS fibre FOV
Round, Polygonal (with mask), square (without mask)
The geometry of an
ApertureMask
can be initialised with the standard DataContainer methods (see Parameters below). Regardless of which method is used, the following columns must be present:x y arcsec arcsec float float
Certain keywords need to also be included in the ascii header:
# id: <int> # conserve_image: <bool> # x_unit: <str> # y_unit: <str>
If
conserve_image
isFalse
, the flux from all sources in the aperture is summed and distributed uniformly over the aperture area.- Parameters:
- filenamestr
Path to ASCII file containing the columns listed above
- tableastropy.Table
An astropy Table containing the columns listed above
- array_dictdict
A dictionary containing the columns listed above:
{x: [...], y: [...], id: <int>, conserve_image: <bool>}
- Other Parameters:
- pixel_scalefloat
[arcsec] Defaults to
"!INST.pixel_scale"
from the config- idint
An integer to identify the
ApertureMask
in a list of apertures
- property hdu¶
- property header¶
- property mask¶
- required_keys = {'array_dict', 'filename', 'table'}¶
- class scopesim.effects.apertures.RectangularApertureMask(**kwargs)[source]¶
Bases:
ApertureMask
- required_keys = {'height', 'width', 'x', 'y'}¶
- class scopesim.effects.apertures.SlitWheel(**kwargs)[source]¶
Bases:
Effect
Selection of predefined spectroscopic slits and possibly other field masks.
It should contain an open position. A user can define a non-standard slit by directly using the Aperture effect.
- Parameters:
- slit_nameslist of str
- filename_formatstr
A f-string for the path to the slit files
- current_slitstr
Default name
Examples
This Effect assumes a folder full of ASCII files containing the edges of each slit. Each file should be names the same except for the slit’s name or identifier.
This example assumes a folder
masks
containing the slit ASCII files with the naming convention:slit_A.dat
,slit_B.dat
, etc.name: slit_wheel class: SlitWheel kwargs: slit_names: - A - B - C filename_format: "masks/slit_{}.dat current_slit: "C"
- add_slit(newslit, name=None)[source]¶
Add a slit to the SlitWheel.
- Parameters:
- newslitSlit
- namestring
Name to be used for the new slit. If
None
, a name from the newslit object is used.
- property current_slit¶
Return the currently used slit.
- get_table()[source]¶
Create a table of slits with centre position, width and length.
Width is defined as the extension in the y-direction, length in the x-direction. All values are in milliarcsec.
- required_keys = {'current_slit', 'filename_format', 'slit_names'}¶