.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "report/full_run/transient_characterization/plot_characterized_footprints.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_report_full_run_transient_characterization_plot_characterized_footprints.py: Overlap of Characterized Events =============================== Which of the characterized events can also be seen by other surveys, and where in the UVEX surveys are they? This repeats the :ref:`detection analysis ` for the events that pass the standard cuts of the :ref:`previous page `. These are the events with enough repeat detections, a bright enough peak and a tightly bracketed explosion to be classified, so overlap with ZTF and Rubin here is overlap that can be used for classification and follow-up. .. note:: Overlap is on the sky only. It does not say whether ZTF or Rubin was observing the position while the event was bright. Testing against the Rubin footprint needs the optional ``rubin_scheduler`` package (``pip install "uvex-transients[rubin]"``), and without it that column reads "n/a". .. GENERATED FROM PYTHON SOURCE LINES 19-41 .. code-block:: Python from matplotlib import pyplot as plt from uvex_transients.utils.plotting import set_plot_style from uvex_transients.utils.summary_report import STANDARD_POPULATIONS, SummaryReport set_plot_style() # The standard cuts, as on the previous page. Change them here to see a different selection. MIN_DETECTIONS = 2 PEAK_MAG_LIMIT = 23.0 try: report = SummaryReport.from_release( STANDARD_POPULATIONS, min_detections=MIN_DETECTIONS, peak_mag_limit=PEAK_MAG_LIMIT ) except (ConnectionError, LookupError, OSError, ValueError) as err: report = None print(f"Skipping this page's analysis, the release data is not available: {err}") else: print(f"{report.selected.sum():,} of {len(report.summary):,} detected events are characterized.") .. rst-class:: sphx-glr-script-out .. code-block:: none 554 of 12,291 detected events are characterized. .. GENERATED FROM PYTHON SOURCE LINES 42-49 Overlap by type ---------------- Each cell is the percentage of a type's characterized events whose position is inside the footprint of a survey, and the number in brackets after the type is its expected number of characterized events. A type's percentages need not add up to 100%, since the UVEX regions overlap each other and an event can be inside the footprints of several surveys. A type with no characterized events reads "n/a". .. GENERATED FROM PYTHON SOURCE LINES 49-55 .. code-block:: Python if report is not None: report.plot_footprint_overlap() plt.show() .. image-sg:: /report/full_run/transient_characterization/images/sphx_glr_plot_characterized_footprints_001.png :alt: plot characterized footprints :srcset: /report/full_run/transient_characterization/images/sphx_glr_plot_characterized_footprints_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 56-57 The same numbers as a table: .. GENERATED FROM PYTHON SOURCE LINES 57-65 .. code-block:: Python if report is not None: overlap = report.footprint_overlap() overlap["expected_events"].info.format = ",.0f" for column in overlap.colnames[2:]: overlap[column].info.format = ".1f" overlap.pprint_all() .. rst-class:: sphx-glr-script-out .. code-block:: none population expected_events LMLZ wide LMLZ deep Magellanic Clouds ZTF Rubin ---------- --------------- --------- --------- ----------------- ----- ----- Type Ia 306 73.3 0.0 0.0 66.7 73.3 Type Ib 0 nan nan nan nan nan Type Ic 20 100.0 0.0 0.0 100.0 100.0 Type Ic-BL 0 nan nan nan nan nan Type IIP 5,912 78.0 1.7 0.0 88.1 59.3 Type IIb 520 84.6 7.7 0.0 76.9 69.2 SLSN-I 1,086 68.5 1.9 0.0 85.2 75.9 TDE 304 66.9 1.6 1.3 78.7 73.1 llGRB 5 60.0 20.0 0.0 60.0 100.0 LFBOT 10 78.4 1.0 0.0 85.3 70.6 Kilonova 0 nan nan nan nan nan .. GENERATED FROM PYTHON SOURCE LINES 66-73 Where the events are --------------------- The characterized events on the sky, each type in its own color, over the three UVEX regions. The supernovae are so numerous that they mostly trace the survey itself, so they are drawn apart from the rare types, which are the ones whose sky distribution is worth reading. The positions are Monte Carlo events, so the number of points is not the expected number of events. .. GENERATED FROM PYTHON SOURCE LINES 73-86 .. code-block:: Python if report is not None: rare = ["slsne", "tde", "llgrb", "lfbot", "kilonova"] supernovae = SummaryReport( report.summary, {k: v for k, v in report.populations.items() if k not in rare}, min_detections=MIN_DETECTIONS, peak_mag_limit=PEAK_MAG_LIMIT, ) supernovae.plot_sky(mask=supernovae.selected) plt.show() .. image-sg:: /report/full_run/transient_characterization/images/sphx_glr_plot_characterized_footprints_002.png :alt: Sky distribution (Monte Carlo events) :srcset: /report/full_run/transient_characterization/images/sphx_glr_plot_characterized_footprints_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 87-88 The rare types, SLSNe, TDEs, llGRBs, LFBOTs and kilonovae: .. GENERATED FROM PYTHON SOURCE LINES 88-100 .. code-block:: Python # sphinx_gallery_thumbnail_number = 3 if report is not None: exotic = SummaryReport( report.summary, {k: v for k, v in report.populations.items() if k in rare}, min_detections=MIN_DETECTIONS, peak_mag_limit=PEAK_MAG_LIMIT, ) exotic.plot_sky(mask=exotic.selected) plt.show() .. image-sg:: /report/full_run/transient_characterization/images/sphx_glr_plot_characterized_footprints_003.png :alt: Sky distribution (Monte Carlo events) :srcset: /report/full_run/transient_characterization/images/sphx_glr_plot_characterized_footprints_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.780 seconds) .. _sphx_glr_download_report_full_run_transient_characterization_plot_characterized_footprints.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_characterized_footprints.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_characterized_footprints.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_characterized_footprints.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_