{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Telescopes\n", "\n", "`RUBIX` offers the oppertunity to observe with different instruments. To define an instrument, you have to create a `telescope_config` and then you can load the instrument with the `TelescopeFactory`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# NBVAL_IGNORE_OUTPUT\n", "from rubix.telescope import TelescopeFactory\n", "\n", "telescope_config = {\n", " \"MUSE\": {\n", " \"fov\": 5.0,\n", " \"spatial_res\": 0.2,\n", " \"wave_range\": [4700.15, 9351.4],\n", " \"wave_res\": 1.25,\n", " \"lsf_fwhm\": 2.51,\n", " \"signal_to_noise\": None,\n", " \"wave_centre\": 6975.775,\n", " \"aperture_type\": \"square\",\n", " \"pixel_type\": \"square\"\n", " }\n", "}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# NBVAL_IGNORE_OUTPUT\n", "factory = TelescopeFactory(telescope_config) # Uses the defined telescope configuration\n", "telescope = factory.create_telescope(\"MUSE\")\n", "print(telescope)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Predefined instruments\n", "\n", "Some instruments are predefined (e.g. MUSE) and you can load them without defining an own `telescope_config`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# NBVAL_IGNORE_OUTPUT\n", "factory = TelescopeFactory() # Uses the default config\n", "telescope = factory.create_telescope(\"MUSE\")\n", "print(telescope)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from rubix.core.telescope import get_telescope\n", "\n", "config_MUSE = {\"telescope\": {\"name\": \"MUSE\"}}\n", "\n", "telescope = get_telescope(config_MUSE)\n", "print(telescope)" ] } ], "metadata": { "kernelspec": { "display_name": "rubix", "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.10.14" } }, "nbformat": 4, "nbformat_minor": 2 }