PSF report (wcc_sim.psfreport)
PSF radial-profile report: the Airy core and the scattered-light halo.
psf_decomposition(field) splits a simulated field’s PSF into its two physical terms on a common radial grid and measures the profile that actually landed in the image, so the model and the render can be compared directly. make_psf_report(field, path) draws that as a one-page PDF+PNG.
The report’s panels are also public, each taking ax=None:
plot_psf_profile, plot_cutout and plot_satmask (and, as methods,
field.plot_psf_profile() etc.), so a notebook can show one of them
without building the whole page.
The headline number is the Airy-peak-to-scatter-peak contrast, defined
exactly as wcc_etc.scatter_psf.report_diagnostics defines it – the
analytic Airy peak of a (1 - f_scat) core over the halo’s central
irradiance, both in W/mm^2 per watt reaching the image plane – so it is directly
comparable with the wcc_etc build report. At 450 nm it is ~1e9.
Rendering uses a plain (pyplot-free) matplotlib Figure, so it works headless and never opens a window.
- wcc_sim.psfreport.psf_decomposition(field, n_bins=140, star=0)[source]
Radial profiles of the PSF’s Airy and scattered-light terms.
- Parameters:
field (SimulatedField) – Must come from a run that kept models (any simulate_field call).
n_bins (int) – Log-spaced radial bins.
star (int) – Catalog row to profile; the brightest star is usually row 0.
- Returns:
r_pxand, on that grid,airy/scatter/total(model, PSF fraction per detector pixel) andmeasured(fromimage_clean, background-subtracted and divided by the star’s electrons). Plus the peak irradiances, their ratiocontrast, thecrossover_pxwhere scatter overtakes diffraction, the drawnr_out_pxand thefloor_fracit came from.- Return type:
- wcc_sim.psfreport.reproduction_settings(field)[source]
The simulate_field arguments needed to reproduce this figure.
- wcc_sim.psfreport.reproduction_call(field, width=4)[source]
A pasteable simulate_field(…) snippet for this figure.
The catalog is not included: a synthetic scene cannot be recovered from the header, so the source list is described separately.
- wcc_sim.psfreport.select_image(field, which)[source]
One of
field.image_adu/image_e/image_cleanby short name.
- wcc_sim.psfreport.plot_cutout(field, ax=None, star=0, half_width=300, which='clean', cbar=True)[source]
A log-stretched cutout around catalog row
star, at native scale.whichpicks the image ("clean","e"or"adu"); the stretch floor is that image’s sky + dark level. Returns the axes.
- wcc_sim.psfreport.plot_satmask(field, ax=None, reserve_slots=False)[source]
Where the frame saturated, block-reduced with OR so nothing vanishes.
In the report it is drawn directly under the full frame at the same size:
reserve_slots=Truereserves the same (invisible) cut and colorbar slots around it, so the two panels are pixel-for-pixel comparable. Returns the axes.
- wcc_sim.psfreport.plot_psf_profile(field, ax=None, star=0, dec=None)[source]
Log-log radial profile: Airy core, scatter halo, total, and the render.
decis apsf_decomposition()result, computed here when not given. Returns the axes.