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_eff in pixels (analytic).

Sersic2D’s amplitude is 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.

profile holds r_eff (arcsec, required) and any of SERSIC_DEFAULTS. center is the source position (cx, cy) the dx/dy offset 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) when total is 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 oversample x oversample sub-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 default oversample, and never exceeds 1 (see tests/imaging/test_extended.py).