.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/simulating/plot_action_photometry.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_action_photometry.py: Action: Synthetic Photometry ================================= :meth:`~uvex_transients.simulation.core.SurveySimulator.run_photometry_action` is a thin wrapper over `~uvex_transients.simulation.event_catalog.EventCatalog.simulate_photometry`, supplying the simulator's own `transient_collection`/`survey_schedule`. It runs real synthetic photometry, band by band and observation by observation, for every event in a catalog, and is normally run only after the cuts have already narrowed things down to the events worth the cost. .. GENERATED FROM PYTHON SOURCE LINES 12-40 .. code-block:: Python import numpy as np from astropy import units as u 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 get_band_color, plot_band_light_curve, resolve_fig_axes, set_plot_style set_plot_style() schedule = get_schedule() slsn = MagnetarSLSNe() simulator = SurveySimulator(schedule, transients={"slsn": slsn}, simulation_seed=42) TIME_BINS = 10 NSIDE = 32 DOWNSAMPLE = 50 MAG_LIMIT = 25.0 SNR_THRESHOLD = 5.0 catalog = simulator.generate_events(time_bins=TIME_BINS, nside=NSIDE, sampling_factor=1 / DOWNSAMPLE) mag_filtered = simulator.filter_by_limiting_magnitude(catalog, uvex, mag_limit=MAG_LIMIT) detected = simulator.filter_by_snr(mag_filtered, uvex, snr_threshold=SNR_THRESHOLD) print(f"{len(detected)} events detected (before scaling by DOWNSAMPLE).") .. 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_action_photometry.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_action_photometry.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_