.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_skymap.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_skymap.py: ======================== Multiple exemple of how to use km3astro.plot ======================== .. GENERATED FROM PYTHON SOURCE LINES 7-96 .. rst-class:: sphx-glr-script-out Out: .. code-block:: none ligo.skymap requires Python 3.8+ | .. code-block:: default # Author: Tedjditi Hichem import numpy as np import pandas as pd import sys import km3astro.plot as kp from km3net_testdata import data_path def main(): if sys.version_info < (3, 8): print("ligo.skymap requires Python 3.8+") return table_read = pd.read_csv( data_path("astro/antares_coordinate_systems_benchmark.csv"), comment="#" ) alert_type = [ "GRB", "Transient", "Neutrino", "NuEM", "GRB", "GRB", "Transient", "Neutrino", "GRB", "GRB", "Neutrino", "Neutrino", "GRB", "GRB", "Transient", "GRB", "NuEM", ] table_read["Alert_type"] = alert_type _ = kp.skymap_list( dataframe=table_read, frame="equatorial", frame_input="UTM", detector="antares", outfile="test_plot_skymap_list_equatorial_antares.png", ) _ = kp.skymap_list( dataframe=table_read, frame="galactic", frame_input="UTM", detector="orca", outfile="test_plot_skymap_list_galactic_orca.png", ) _ = kp.skymap_alert( ra=80, dec=-20, obstime="2022-07-18T03:03:03", frame="equatorial", detector="orca", outfile="test_plot_skymap_alert_equatorial_orca.png", ) _ = kp.skymap_alert( ra=80, dec=-20, error_radius=5, obstime="2022-07-18T03:03:03", frame="galactic", detector="antares", outfile="test_plot_skymap_alert_galactic_antares.png", ) # Gives a 404 error # _ = kp.skymap_hpx( # skymap_url="https://gracedb.ligo.org/api/superevents/MS230522k/files/bayestar.fits.gz,1", # obstime="2022-07-18T03:03:03", # nside=32, # detector="arca", # outfile="test_plot_skymap_hpx_arca.png", # ) if __name__ == "__main__": main() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.002 seconds) .. _sphx_glr_download_auto_examples_plot_skymap.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_skymap.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_skymap.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_