Extended sources (wcc_etc.extended)
Extended (spatially resolved) scene elements: Sersic-profile hosts.
Angular parameterization only — r_eff, dx, dy in arcsec, pa in
degrees CCW from +x — the convention shared with wcc-sim’s SersicComponent,
Pandeia and the HST ETC. Distance / redshift are deliberately not modelled.
- wcc_etc.extended.sersic_total_over_amplitude(n, r_eff_pix, ellip=0.0)[source]
F_total / I_e for a Sersic2D profile with
r_effin pixels (analytic).Sersic2D’s
amplitudeis the surface brightness at r_eff per pixel area; integrating over the plane gives 2 pi n r_eff^2 (1-ellip) e^bn bn^(-2n) Gamma(2n).
- wcc_etc.extended.render_sersic(profile, plate_scale_arcsec, npix, oversample=11, center=None, total=True)[source]
Sersic profile on an (npix, npix) detector grid, attached to
center.profileholdsr_eff(arcsec, required) and any of SERSIC_DEFAULTS.centeris the source position (cx, cy) thedx/dyoffset is measured from; default is the integer grid centre(npix-1)//2(psfsim.grid_center), the convention every PSF render shares. Returns the per-pixel profile: unit total flux (analytic, so light off the grid is lost, not renormalized) whentotalis True, else I/I_e.Pixel integration: the 5x5 pixels around the cusp are integrated exactly (adaptive quadrature split at the cusp), a core box around them is pixel-averaged on an
oversamplexoversamplesub-grid, and the rest is sampled at pixel centres. Validated against analytic enclosed-flux bounds for n in [0.5, 8] and r_eff down to 0.18 pixel: the on-grid total is within ~1e-4 of the analytic value at the defaultoversample, and never exceeds 1 (see tests/imaging/test_extended.py).