scopesim.optics.optics_manager.OpticsManager#
- class scopesim.optics.optics_manager.OpticsManager(yaml_dicts=None, cmds=None, **kwargs)#
Bases:
objectThe workhorse class for dealing with all externally defined Effect objects.
- Parameters:
- __init__(yaml_dicts=None, cmds=None, **kwargs)#
Methods
__init__([yaml_dicts, cmds])add_effect(effect[, ext])Add an Effect object to an OpticalElement at index
ext.get_all(class_type)Return list of all effects from all optical elements with class_type.
get_z_order_effects(z_level)Return a list of all effects with a z_order keywords within z_level.
list_effects()load_effects(yaml_dicts, **kwargs)Generate an OpticalElement for each section of the Optical System.
Return formatted string representation as str.
report([filename, output, rst_title_chars])set_derived_parameters()system_transmission([plot])Compute system transmission
update(**obs_dict)Update the meta dictionary with keyword-value pairs.
write_string(stream)Write formatted string representation to I/O stream.
Attributes
Get all effects in all optical elements.
areaGet effects with z_order = 900...999.
Get effects with z_order = 800...899.
Get effects with z_order = 400...499 (DetectorLists only!).
Return name or filename or placeholder.
Get effects with z_order = 1000...1099.
Get effects with z_order = 600...699.
Get effects with z_order = 200...299.
Get effects with z_order = 700...799.
Get headers from detector setup effects.
Get effects with z_order = 300...399.
Return True if any of the effects is a spectroscope.
Get effects with z_order = 500...599.
- property detector_setup_effects: list[Effect]#
Get effects with z_order = 400…499 (DetectorLists only!).
- get_all(class_type) list[Effect]#
Return list of all effects from all optical elements with class_type.
- Parameters:
class_type (class object) – The class to be searched for. Must be an class object with base-class
Effect- Returns:
effects
- Return type:
list of Effect objects
- get_z_order_effects(z_level: int) list[Effect]#
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
Apply FITS header effects - z_order = 1000…1100
- Parameters:
z_level ({0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}) – 100-range of z_orders.
- Returns:
effects
- Return type:
list of Effect objects
- property image_plane_headers#
Get headers from detector setup effects.
- load_effects(yaml_dicts, **kwargs) None#
Generate an OpticalElement for each section of the Optical System.
Make an
OpticalElementfor 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
.yamlfiles, or be contained in a single.yamlfile separated by a yaml-document-separator: `` n — n ``.- Parameters:
yaml_dicts (list of dicts) – Each YAML dict should contain the descriptions of the Effects needed by each
OpticalElement.
- system_transmission(plot=False)#
Compute system transmission
The method computes the total system transmission and returns it as a
synphot.spectrum.SpectralElement.When
plotisTrue, it creates a plot of the transmission curves of the indivdual elements in the system as well as the system transmission.