.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/end_to_end/plot_transit_spectrum.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_end_to_end_plot_transit_spectrum.py: Plot the spectrum of a transiting planet ======================================== This example runs VSPEC with a transiting planet scenario. .. GENERATED FROM PYTHON SOURCE LINES 7-21 .. code-block:: Python from pathlib import Path import numpy as np import matplotlib.pyplot as plt import libpypsg from VSPEC import ObservationModel,PhaseAnalyzer try: CFG_PATH = Path(__file__).parent / 'transit_spectrum.yaml' except NameError: CFG_PATH = Path('transit_spectrum.yaml') libpypsg.docker.set_url_and_run() .. rst-class:: sphx-glr-script-out .. code-block:: none Saved settings to /home/runner/.libpypsg/settings.json Reloading settings... .. GENERATED FROM PYTHON SOURCE LINES 22-26 Initialize the VSPEC run ------------------------ We read in the config file and run the model. .. GENERATED FROM PYTHON SOURCE LINES 26-31 .. code-block:: Python model = ObservationModel.from_yaml(CFG_PATH) model.build_planet() model.build_spectra() .. rst-class:: sphx-glr-script-out .. code-block:: none Starting at phase 178.8 deg, observe for 1.5 h in 18 steps Phases = [178.8 178.92 179.05 179.18 179.3 179.42 179.55 179.68 179.8 179.92 180.05 180.17 180.3 180.42 180.55 180.67 180.8 180.92 181.05] deg Build Planet: 0%| | 0/19 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_transit_spectrum.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_transit_spectrum.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_