scopesim.optics.optics_manager module¶
- class scopesim.optics.optics_manager.OpticsManager(yaml_dicts=None, cmds=None, **kwargs)[source]¶
Bases:
object
The workhorse class for dealing with all externally defined Effect objects.
- Parameters:
- yaml_dictslist of dict
The nested dicts describing the Effects from the relevant YAML files, which include
effects
andproperties
sub-dictionaries- kwargsexpanded dict
Any extra information not directly related to the optical elements
- add_effect(effect, ext=0)[source]¶
Add an Effect object to an OpticalElement at index
ext
.- Parameters:
- effectEffect
Effect object to be added
- extint
Index number of the desired OpticalElement, contained in the list
self.optical_elements
- property all_effects¶
Get all effects in all optical elements.
- property area¶
- property detector_array_effects¶
Get effects with z_order = 900…999.
- property detector_effects¶
Get effects with z_order = 800…899.
- property detector_setup_effects¶
Get effects with z_order = 400…499 (DetectorLists only!).
- property display_name¶
- property fov_effects¶
Get effects with z_order = 600…699.
- property fov_setup_effects¶
Get effects with z_order = 200…299.
- get_all(class_type)[source]¶
Return list of all effects from all optical elements with class_type.
- Parameters:
- class_typeclass object
The class to be searched for. Must be an class object with base-class
Effect
- Returns:
- effectslist of Effect objects
- get_z_order_effects(z_level: int)[source]¶
Return a list of all effects with a z_order keywords within z_level.
Effect z_order values are classified according to the following:
Make a FOV list - z_order = 0..99
Make a image plane - z_order = 100..199
Apply Source altering effects - z_order = 200..299
Apply FOV specific (3D) effects - z_order = 300..399
Apply FOV-independent (2D) effects - z_order = 400..499
Apply XXX effects - z_order = 500..599
Apply XXX effects - z_order = 600..699
Apply lambda-independent 2D image plane effects - z_order = 700..799
Apply detector effects - z_order = 800..899
Apply detector array effects - z_order = 900..999
- Parameters:
- z_level{0, 100, 200, 300, 400, 500, 600, 700, 800, 900}
100-range of z_orders.
- Returns:
- effectslist of Effect objects
- property image_plane_effects¶
Get effects with z_order = 700…799.
- property image_plane_headers¶
Get headers from detector setup effects.
- property image_plane_setup_effects¶
Get effects with z_order = 300…399.
- property is_spectroscope¶
Return True if any of the effects is a spectroscope.
- load_effects(yaml_dicts, **kwargs)[source]¶
Generate an OpticalElement for each section of the Optical System.
Make an
OpticalElement
for each YAML document in the system. For example there should be a YAML document for each of the following:Atmosphere
Telescope
Relay optics
Instrument
Detector
The YAML files can each be separate
.yaml
files, or be contained in a single.yaml
file separated by a yaml-document-separator: ``— ``.
- Parameters:
- yaml_dictslist of dicts
Each YAML dict should contain the descriptions of the Effects needed by each
OpticalElement
.
- property source_effects¶
Get effects with z_order = 500…599.
- property surfaces_table¶
Get combined surface table from effects with z_order = 100…199.
- property system_transmission¶