.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_tutorials/lightcurves/lightcurve_plotting.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_tutorials_lightcurves_lightcurve_plotting.py: ######################### Light Curve Customisation ######################### When plotting light curves, :meth:`~ATK.Models.DataSet.plot` - and hence :meth:`~ATK.Models.DataSet.open` - accepts the following additional arguments. | Specifying Bands ================ If only certain photometric bands are of interest, the ``bands`` parameter can be passed as a list of bands that should be included in plotting: .. GENERATED FROM PYTHON SOURCE LINES 13-19 .. code-block:: Python from ATK import query asassn_query = query("lightcurve", targets=6050296829033196032, survey="asassn", path="example_lightcurve.fits.gz") asassn_query.open(bands=["g"]) .. raw:: html
Bokeh Figure


.. GENERATED FROM PYTHON SOURCE LINES 35-49 | .. note:: ATK supports the following lightcurve surveys and bands: .. include:: supported_lightcurve_surveys.rst | | Setting Band Colours ==================== The colours of each band can also be chosen: .. GENERATED FROM PYTHON SOURCE LINES 49-52 .. code-block:: Python asassn_query.open(bands=["v","g"], colours=["orange","blue"]) .. raw:: html
Bokeh Figure


.. GENERATED FROM PYTHON SOURCE LINES 62-66 | .. note:: The following colours are supported: ``"green"``, ``"red"``, ``"blue"``, ``"orange"``, ``"purple"``, ``"black"`` .. GENERATED FROM PYTHON SOURCE LINES 68-74 | | Choosing a Colour Map ===================== By default, the colour map scales relative to the **mean** brightness of the photometry in each band. This can be disabled by setting ``cmap = "flat"`` (default = ``"mean"``): .. GENERATED FROM PYTHON SOURCE LINES 74-77 .. code-block:: Python asassn_query.open(cmap="flat") .. raw:: html
Bokeh Figure


.. GENERATED FROM PYTHON SOURCE LINES 87-93 | | Using Non-Reduced MJD ===================== By default, the x-axis is reduced to show the time since the earliest observation in each set of light curves (i.e. the minimum MJD across all bands is subtracted). To instead plot the unmodified MJD, pass ``time_format = "original"``: .. GENERATED FROM PYTHON SOURCE LINES 93-96 .. code-block:: Python asassn_query.open(time_format="original") .. raw:: html
Bokeh Figure


.. GENERATED FROM PYTHON SOURCE LINES 106-111 | | | .. rubric:: Download this Tutorial .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.898 seconds) .. _sphx_glr_download_auto_tutorials_lightcurves_lightcurve_plotting.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: lightcurve_plotting.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: lightcurve_plotting.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: lightcurve_plotting.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_