producer.deploy module¶
Provides class and functions to interact with FOBOS aperture deployment.
- class producer.deploy.FOBOSApertures(mode=1, baseline=True, config=1)[source]¶
Bases:
object- ap_bm = <producer.deploy.FOBOSApertureBitMask object>¶
Aperture selection bit mask
- configure(mode=None, baseline=None, config=None)[source]¶
Set the active apertures based on the provided mode.
Configuration sets internal attributes that can be accessed
- Parameters
mode (
int, array-like) – The mode assignment for each spectrograph. Must be 1 for the single-fiber apertures, 2 for multi-IFU mode, or 3 for monolithic IFU mode. If a single integer, all spectrographs are put in the same mode; otherwise, must provide the mode for each of the 3 spectrographs separately.baseline (
bool, optional) – Flag to only return the apertures in the CoDR baseline configuration.config (
int, optional) – Configuration selection for mapping aperture modules to each spectrograph. Must be either: (1) modules mapped to each spectrograph are spread over the entire focal plane; or (2) modules mapped to each spectrograph fill coherent focal-plane zones.
- fov = 0.3333333333333333¶
Diameter of the field-of-view in decimal degrees.
- mode_bm = <producer.deploy.FOBOSModeBitMask object>¶
Mode selection bit mask
- module_src = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/fobos-producer/envs/stable/lib/python3.8/site-packages/producer/data/deploy/fobos_modules.db')¶
File providing the centers of all FOBOS starbug modules. This is currently never used.
- static parse_mode(mode)[source]¶
Parse and validate the provided FOBOS spectrograph mode.
- Parameters
mode (
int, array-like) – The mode assignment for each spectrograph. Must be 0 to turn off all apertures, 1 to select single-fiber mode, 2 for multi-IFU mode, or 3 for monolithic IFU mode. If a single integer, all spectrographs are put in the same mode; otherwise, must provide the mode for each of the 3 spectrographs separately.- Returns
A 3-element array with the integer mode identifier for each of the three spectrographs.
- Return type
- Raises
ValueError – Raised if the mode number is not understood, or if the mode is not provided as a single value or one for each spectrograph.
- select(payload)[source]¶
Construct a boolean array that selects specific payload types.
- Type must be:
'science'for science apertures,'sky'for designated sky apertures,'guide'for imaging guide bundles, or'calib'for flux-calibration bundles.
Note that in MOS mode (mode=1), the only sky fibers are the ones designated for the always-ready IFU in spectrograph 1.
- Parameters
payload (
str) – The payload selection.return_id (
bool, optional) – Return the running (0-indexed) number for the aperture.
- Returns
A boolean array used to select the viable apertures of the requested type.
- Return type
- show(include_patrol=False, by_spec=False, legend=True)[source]¶
Make a plot of the currently active apertures.
- Parameters
include_patrol (
bool, optional) – Use a light shaded region to show the patrol region of every aperture.by_spec (
bool, optional) – Instead of coloring the aperture locations by their payload type, color them by their spectrograph mapping.legend (
bool, optional) – Include the plot legend
- starbug_src = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/fobos-producer/envs/stable/lib/python3.8/site-packages/producer/data/deploy/fobos_starbugs.db')¶
Main file with the distribution, types, etc of the FOBOS apertures.
- version = '0.1'¶
Version of the aperture deployment design.