scopesim.optics.fov_manager module

Influences.

Spectral: - Red and blue edges of full spectrum - Chunks of a large spectral range

Spatial: - On-sky borders of Detector Array - On-sky borders of Aperture Mask - Chunks of large on-sky area - Slit mask borders - Multiple slits for IFU, mirror-MOS - Multiple lenses for fibre-fed MOS - each Effect should submit a list of volumes

IFU spectroscopy depends on: - the tracelist - the list of apertures - the detector array borders - PSF wavelength granularity - Atmospheric dispersion

MOS spectroscopy depends on: - the tracelist - the list of apertures - Atmospheric dispersion - PSF wavelength granularity - the detector array borders

Long slit spectroscopy depends on: - the tracelist ra, dec, lam vol –> x, y area - the slit aperture - the detector array borders - PSF wavelength granularity - Atmospheric dispersion

Imaging dependent on: - Detector array borders - PSF wavelength granularity - Atmospheric dispersion

class scopesim.optics.fov_manager.FOVManager(effects=None, cmds=None, **kwargs)[source]

Bases: object

A class to manage the (monochromatic) image windows covering the target.

Parameters:
effectslist of Effect objects

Passed from optics_manager.fov_setup_effects

property fov_footprints
property fovs
generate_fovs_list() Iterator[FieldOfView][source]

Generate a series of FieldOfViews objects based self.effects.

Yields:
Iterator[FieldOfView]

Generator-Iterator of FieldOfView objects.

class scopesim.optics.fov_manager.FovVolumeList(initial_volume=None)[source]

Bases: FOVSetupBase, MutableSequence

List of FOV volumes for FOVManager.

extract(axes, edges, aperture_id=None)[source]

Return new volumes from within all existing volumes.

This method DOES NOT alter the existing self.volumes list To include the returned volumes, add them to the self.volumes list

Parameters:
axeslist of either {“wave”, “x”, “y”}

Which axis (list of single str) or axes (list[str]) to use. Must be list in either case.

edgeslist, tuple of lists

Edge points for each axes listed

aperture_idint, optional

Default None. If None, extract from all volumes. If int, only extract from volumes with this aperture_id in the meta dict

Returns:
new_volslist of dicts

A list of all new volumes extracted from existing volumes

Examples

::
>>> fvl = FovVolumeList()
>>> fvl.split("x", 0)
>>> new_vols = fvl.extract(axes=["wave"], edges=([0.5, 0.6], ))
>>> new_vols = fvl.extract(axes=["x", "y"], edges=([-1, 1], [0, 5]))
>>> new_vols = fvl.extract(axes=["x", "y", "wave"],
>>>                        edges=([-1, 1], [0, 5], [0.5, 0.6]))
>>> new_vols = fvl.extract(axes=["x", "y"], edges=([-1, 1], [0, 5]),
>>>                        aperture_id=1)
>>>
>>> fvl += [new_vols]
insert(index, value)[source]

S.insert(index, value) – insert value before index

shrink(axis, values, aperture_id=None) None[source]

Trim axes to new min/max value(s).

  • Loop through all volume dict

  • Replace any entries where min < values.min

  • Replace any entries where max > values.max

Parameters:
axis{“wave”, “x”, “y”} or list thereof

Which axis (str) or axes (list[str]) to use.

valueslist of 2 floats

[min, max], [min, None], [None, max]

aperture_idint, optional

Default None. If None, shrink all volumes. If int, only shrink volumes with this aperture_id in the meta dict

Examples

::
>>> fvl = FovVolumeList()
>>> fvl.shrink(axis="wave", values=[3.0, 3.1])
>>> fvl.shrink(axis="wave", values=[2.9, 3.1], aperture_id=1)
>>> fvl.shrink(axis=["x", "y"], values=([-1, 1], [0, 5]))
split(axis, value, aperture_id=None) None[source]

Split the all volumes that include axis=value into two.

  • Loop through all volume dict

  • Find any entries where min < value < max

  • Add two new entries with [min, value], [value, max]

Parameters:
axis{“wave”, “x”, “y”}, or list thereof

Which axis (str) or axes (list[str]) to use.

valuefloat, list of floats
aperture_idint, optional

Default None. If None, split all volumes. If int, only split volumes with this aperture_id in the meta dict

Examples

::
>>> fvl = FovVolumeList()
>>> fvl.split(axis="wave", value=1.5)
>>> fvl.split(axis="wave", value=[3.0, 3.1])
>>> fvl.split(axis=["x", "y"], value=[0, 0])
>>> fvl.split(axis=["x", "y"], value=([-1, 1], 0))
>>> fvl.split(axis=["x", "y"], value=([-1, 1], [0, 5]))
>>> fvl.split(axis="wave", value=3.0, aperture_id=1)
>>> fvl.split(axis="wave", value=3.0, aperture_id=None)
write_string(stream: TextIO) None[source]

Write formatted string representation to I/O stream.