apertures¶
ApertureList¶
A list of apertures, useful for IFU or MOS instruments.
Parameters¶
Examples¶
File format¶
Much like an ApertureMask, an ApertureList can be initialised by either of the three standard DataContainer methods. The easiest is however to make an ASCII file with the following columns:
id left right top bottom angle conserve_image shape
arcsec arcsec arcsec arcsec deg
int float float float float float bool str/int
Acceptable shape
entries are: round
, rect
, hex
, oct
, or
an integer describing the number of corners the polygon should have.
A polygonal mask is generated for a given shape
and will be scaled
to fit inside the edges of each aperture list row. The corners of each
aperture defined by shape are found by finding equidistant positions around
an ellipse constrained by the edges (left
, …, etc). An additional
optional column offset
may be added. This column describes the offset
from 0 deg to the angle where the first corner is set.
Additionally, the filename of an ApertureMask
polygon file can be
given. The geometry of the polygon defined in the file will be scaled to
fit inside the edges of the row.
Note
shape
values "rect"
and 4
do not produce equal results
Both use 4 equidistant points around an ellipse constrained by
[left
, …, etc]. However "rect"
aims to fill the contraining
area, while 4
simply uses 4 points on the ellipse.
Consequently, 4
results in a diamond shaped mask covering only
half of the constraining area filled by "rect"
.
ApertureMask¶
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
is False
, 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
RectangularApertureMask¶
SlitWheel¶
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_names : list 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"