.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/simulating/plot_cut_limiting_magnitude.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_simulating_plot_cut_limiting_magnitude.py: Cut: Limiting Magnitude =========================== :meth:`~uvex_transients.simulation.core.SurveySimulator.filter_by_limiting_magnitude` is the cheapest of the cuts: no schedule, no noise model, just "could this event, at its brightest sampled phase, ever clear a fixed magnitude limit?" It is meant to run first, on a freshly sampled catalog, before anything schedule-aware. .. GENERATED FROM PYTHON SOURCE LINES 10-25 .. code-block:: Python from matplotlib import pyplot as plt from uvex_transients.missions import uvex_fast as uvex from uvex_transients.simulation.core import SurveySimulator from uvex_transients.surveys import get_schedule from uvex_transients.transients.supernovae import MagnetarSLSNe from uvex_transients.utils.plotting import resolve_fig_axes, set_plot_style set_plot_style() schedule = get_schedule() slsn = MagnetarSLSNe() simulator = SurveySimulator(schedule, transients={"slsn": slsn}, simulation_seed=42) .. GENERATED FROM PYTHON SOURCE LINES 26-30 Sampling a population -------------------------- A freshly sampled catalog, with no screening applied yet. .. GENERATED FROM PYTHON SOURCE LINES 30-38 .. code-block:: Python TIME_BINS = 10 NSIDE = 32 DOWNSAMPLE = 50 catalog = simulator.generate_events(time_bins=TIME_BINS, nside=NSIDE, sampling_factor=1 / DOWNSAMPLE) print(f"Sampled {len(catalog) * DOWNSAMPLE} SLSNe across {TIME_BINS} time bin(s) at NSIDE={NSIDE}.") .. rst-class:: sphx-glr-script-out .. code-block:: none Generating events: 0%| | 0/10 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_cut_limiting_magnitude.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_cut_limiting_magnitude.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_