uvex_transients.transients.base.ExtragalacticTransient.sample_events_on_healpix_grid#

ExtragalacticTransient.sample_events_on_healpix_grid(nside: int, *, t_start: Time, t_end: Time | None = None, duration: Quantity | None = None, pixel_mask: NDArray[bool] | None = None, pixel_ids: NDArray[int64] | None = None, order: str = 'nested', jitter: bool = True, seed: SeedSequence | int | None = None) → QTable[source]#

Draw a Monte Carlo realization of events on a HEALPix grid, over a time window.

Each sampled event is placed uniformly at random within one of the selected HEALPix pixels (optionally jittered to a sub-pixel position; see jitter), assigned a redshift drawn from sample_event_redshift, an explosion time drawn uniformly across [t_start, t_start + duration), and a per-event parameter seed (see spawn_seeds) rather than fully-sampled physical parameters – those are meant to be regenerated lazily, on demand, from that seed (via SpectralModel.sample_parameters).

Parameters:
  • nside (int) – HEALPix resolution parameter of the sampling grid.

  • t_start (Time) – Start of the sampling window.

  • t_end (Time, optional) – End of the sampling window. Mutually exclusive with duration; see _resolve_duration.

  • duration (Quantity, optional) – Length of the sampling window. Mutually exclusive with t_end; see _resolve_duration.

  • pixel_mask (numpy.ndarray of bool, optional) – Boolean mask, shape (ah.nside_to_npix(nside),), selecting which pixels to sample events in. Mutually exclusive with pixel_ids. If neither is given, every pixel in the grid is eligible.

  • pixel_ids (numpy.ndarray of int, optional) – Explicit pixel indices to sample events in. Mutually exclusive with pixel_mask.

  • order (str, optional) – HEALPix pixel ordering scheme ("nested" or "ring"), consistent with whatever ordering pixel_mask/pixel_ids were defined against. The default is "nested".

  • jitter (bool, optional) – If True (the default), place each event at a random sub-pixel position. If False, place every event at its pixel’s center.

  • seed (numpy.random.SeedSequence, int, or None, optional) – Root seed for reproducibility. A single tree of children is spawned from this seed for every stochastic draw in this call – including the event count itself – so that no two draws (however many events end up being sampled) ever share a stream.

Returns:

Event table with one row per sampled event; see _create_event_table_buffer for its columns. Empty (but still correctly typed) if zero events were sampled.

Return type:

astropy.table.QTable