{ "cells": [ { "cell_type": "markdown", "id": "supposed-princess", "metadata": {}, "source": [ "# Turning Effect objects on or off\n", "\n", "To list all the effects in an optical train, we do use the `effects` attribute.\n", "\n", "Alternatively, we can call `opt.optics_manager.all_effects()`" ] }, { "cell_type": "code", "execution_count": null, "id": "obvious-retention", "metadata": {}, "outputs": [], "source": [ "import scopesim as sim\n", "\n", "opt = sim.load_example_optical_train()\n", "opt.effects" ] }, { "cell_type": "markdown", "id": "enabling-tennis", "metadata": {}, "source": [ "Turning an effect on or off is as simple as using setting the `.include` attribute to `true` or `False`:" ] }, { "cell_type": "code", "execution_count": null, "id": "local-stations", "metadata": {}, "outputs": [], "source": [ "opt[\"slit_wheel\"].include = True\n", "opt[\"slit_wheel\"].include = False" ] }, { "cell_type": "code", "execution_count": null, "id": "2302c803", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 5 }