Turning Effect objects on or offΒΆ
TL;DR
optical_train = sim.load_example_optical_train()
optical_train.effects
optical_train["detector_linearity"].include = False
optical_train["detector_linearity"].meta["include"] = True
To list all the effects in an optical train, we do use the effects
attribute.
Alternatively, we can call opt.optics_manager.all_effects()
[1]:
import scopesim as sim
opt = sim.load_example_optical_train()
opt.effects
[1]:
Table length=17
element | name | class | included |
---|---|---|---|
str16 | str22 | str29 | bool |
basic_atmosphere | atmospheric_radiometry | AtmosphericTERCurve | False |
basic_telescope | psf | SeeingPSF | True |
basic_telescope | telescope_reflection | TERCurve | True |
basic_instrument | static_surfaces | SurfaceList | True |
basic_instrument | filter_wheel : [J] | FilterWheel | True |
basic_instrument | slit_wheel : [narrow] | SlitWheel | False |
basic_detector | detector_window | DetectorWindow | True |
basic_detector | qe_curve | QuantumEfficiencyCurve | True |
basic_detector | exposure_action | SummedExposure | True |
basic_detector | dark_current | DarkCurrent | True |
basic_detector | shot_noise | ShotNoise | True |
basic_detector | detector_linearity | LinearityCurve | True |
basic_detector | readout_noise | PoorMansHxRGReadoutNoise | True |
basic_detector | source_fits_keywords | SourceDescriptionFitsKeywords | True |
basic_detector | effects_fits_keywords | EffectsMetaKeywords | True |
basic_detector | config_fits_keywords | SimulationConfigFitsKeywords | True |
basic_detector | extra_fits_keywords | ExtraFitsKeywords | True |
Turning an effect on or off is as simple as using setting the .include
attribute to true
or False
:
[2]:
opt["slit_wheel"].include = True
opt["slit_wheel"].include = False