BackgroundPrior#
- class jinwu.background.BackgroundPrior(n_off_prior: float, t_off: float, area_ratio: float)[source]#
Bases:
objectBackground prior based on OFF-region total counts over a known exposure.
Methods Summary
alpha(t_on)from_epwxt_background(fits_path, *[, ...])Construct BackgroundPrior from a single EP/WXT background FITS file that contains counts per cm^2 accumulated over a reference exposure (typically 1e6 s).
from_epwxt_background_default(*[, chan_lo, ...])Return the ready-made BackgroundPrior values as requested by user.
Methods Documentation
- classmethod from_epwxt_background(fits_path: str, *, chan_lo: int = 53, chan_hi: int = 506, arf_path: str | None = None, arf_bin_lo: int = 81, arf_bin_hi: int = 780, pixel_size_mm: float = 0.015, pixel_fov_deg: float = 0.00229, src_radius_arcmin: float = 9.0, bkg_rin_arcmin: float = 18.0, bkg_rout_arcmin: float = 36.0, t_off: float = 1000000.0, verbose: bool = True) BackgroundPrior[source]#
Construct BackgroundPrior from a single EP/WXT background FITS file that contains counts per cm^2 accumulated over a reference exposure (typically 1e6 s).
This enforces the energy band via detector channels [chan_lo, chan_hi] (default 53–506, about 0.5–4.0 keV), computes the OFF-region prior counts in a desired t_off, and derives area_ratio from instrument geometry.
- Parameters:
fits_path (str) – Path to the background FITS (counts per cm^2). In practice only one combined background file is available.
chan_lo (int) – Inclusive channel bounds to approximate 0.5–4.0 keV.
chan_hi (int) – Inclusive channel bounds to approximate 0.5–4.0 keV.
pixel_size_mm (float) – Pixel size on detector (mm). Default 0.015 mm.
pixel_fov_deg (float) – Sky angular size per pixel (degree). Default 0.00229 deg.
src_radius_arcmin (float) – Source region radius (arcmin). Default 9’.
bkg_rin_arcmin (float) – Background annulus inner/outer radii (arcmin). Default 18’–36’.
bkg_rout_arcmin (float) – Background annulus inner/outer radii (arcmin). Default 18’–36’.
t_off (float) – OFF prior exposure (s) for Li&Ma. Default 1e6 s (matches FITS by default).
verbose (bool) – Print brief diagnostics.
- Return type:
- classmethod from_epwxt_background_default(*, chan_lo: int = 53, chan_hi: int = 506, t_off: float = 1000000.0, verbose: bool = True) BackgroundPrior[source]#
Return the ready-made BackgroundPrior values as requested by user. Ignores file IO and outputs fixed values for reproducibility of quick tests.