Changelog
Unreleased
wcc_sim.simulate_grating_field(modulewcc_sim.grating): full-frame slitless grating images of a Gaia field on the IMX455 or the HWK4123, built onwcc_etc.grating(under development there; the design is provisional). The blue half (350-700 nm) is left of the split column and disperses along +x, the red half (600-1100 nm) is right of it and disperses along +y. A star closer to the split than the beam radius on the grating (620 px on the IMX455) gets both spectra, each scaled by the fraction of its beam on that half; the sky rate changes across the split the same way. One dispersed template per spectral type and half, scaled by G. New header cards GRATING, GRSPLITX, GRBEAMR, GRDISP, GRORDERS, SKYBLUE, SKYRED and CAT columnblue_fraction. Needs wcc_etc >= 0.1.2.Memory guard for image simulations (part of #57): before resampling,
WCCObservation.memory_estimate()estimates peak memory usage during resampling and PSF convolution (depends on the PSF stamp size) conservatively. For the resampling stage, memory usage depends on footprint on the detector, the input image size, and the sub-grid (supersampling) factor k; the conservative approx. requirements are 9 float64 per sub-pixel and 14 per input pixel. For the PSF convolution, memory usage depends on footprint padded by the stamp size. Themax_memory_gblimit considers resampling and convolution per component (plus already computed results). If the estimate is abovemax_memory_gb(default 8 GB, onWCCObservationandsimulate_image) awcc_sim.MemoryLimitError(subclass ofMemoryError) with relevant information is raised. Settingmax_memory_gbtoNoneturns the memory check off.New method
ExtendedComponent.memory_estimate(): returnsNoneby default (component not checked againstmax_memory_gb) or anextended.MemoryEstimate; subclasses may override it.SkyImageComponentoverrides it; the formula is inresample.resample_peak_bytes().WCCObservationaddsrender.render_peak_bytes()for PSF convolution.Validation of
max_memory_gb; now raisingTypeError/ValueErrorif notNoneor a positive finite number.
0.1.1 (2026-10-25)
wcc_sim.GalSimComponent: an extended source described by anygalsim.GSObject(bulge+disk sums, shears, RealGalaxy), normalized bytotal_mag/template/ebvlikeSersicComponentand rendered through the same PSF convolution.wcc_sim.ImageComponent: a calibrated sky image with a WCS (HST drizzled mosaics in e-/s with an AB zero point) reprojected onto the frame withreproject, surface brightness conserved, each pixel treated as an AB-flat source (starflux.rate_for_ab).wcc_sim.phangslists, downloads (once, into~/.cache/wcc_sim/phangs) and loads PHANGS-HST mosaics as ImageComponents, mapping WCC g/r/i to F435W-or-F438W/F555W/F814W.galsim and reproject are an optional extra:
pip install wcc-sim[galaxies].wcc_sim.empty_catalog(): public way to skip the Gaia query (previously the privatecatalog._empty_table).A missing
galsimorreprojectnow raises an ImportError naming thegalaxiesextra instead of a bare ModuleNotFoundError.Tutorial notebook
11_galaxies_phangs: full-frame g/r/i WCC images of NGC 1300 and NGC 4321 from PHANGS-HST and a colour composite.wcc_sim.simulate_image: simulate a WCC exposure of a sky image (FITS with a celestial WCS and physicalBUNIT: Jy/pixel, Jy/arcsec2, MJy/sr, F_lambda or electron/s), e.g. a POLARIS radiative-transfer model. The image is resampled flux-conservingly (reproject_exact) onto a detector-aligned k x k sub-grid and PSF-convolved per sub-pixel phase (render.render_subgrid, identical to oneadd_starper sub-pixel), so compact structure finer than the detector pixel (a planet next to its star) is kept. Built from public pieces:SkyImageComponent(validated image,fitsimage.ImageInput),detector_frame(pointing withoffset_arcsecandpa) andWCCObservation(rate_image(), noiseless e-/s;expose(), noise and saturation, returning aSimulatedField).FITS output of image simulations: a
COMPtable (one row per component) and the SCI cardsPNTSRC,CEN_RA/CEN_DEC,OFFSRA/OFFSDEC,IMGTOT,IMGRATE,IMGSUBK,IMGBUNIT,FLUXORIG,FLUXJY,FLUXFLAM,FLUXBAND,BANDPIV,BANDWID.fluxrate.band_fluxesconverts a count rate back to the flux in the detector band.simulate_field(..., offset_arcsec=(dRA, dDec)): offset pointing (e.g. dithers), applied on the sky beforepa; the default (0, 0) gives the same output as before.render.unit_stamp: the PSF stamp construction factored out ofadd_starso stars and images use the same stamp; stars are rendered bit-identically.Optional extra
pip install wcc-sim[image](reproject, without galsim); thetestextra now includes reproject.Tutorial notebook
12_image_sources: a synthetic star + inclined ring + planet image through each step, with flux-conservation checks.psf.centroid_offsetno longer uses a matrix product, which on macOS (Accelerate BLAS) emitted spurious RuntimeWarnings; tutorials 01/02/03/05/08/09 re-executed without them (#54).
0.1.0 (2026-10-12)
First public release (PyPI). 0.1.0rc1 went to TestPyPI the same day.
Packaging
wcc_etc>=0.1.0is a declared dependency (it is on PyPI since 0.1.0), imported through its publicKIND_NAMESandSENSORFILTER_FOCUSnames, andwcc_sim.require_wcc_etc()turns a missing or too-old wcc_etc into a readable ImportError. CI installs wcc-etc from PyPI and a second job builds the wheel from the checkout, installs it into an empty venv and runs an offline simulation. Taggedv*pushes publish to TestPyPI, and final tags to PyPI, by trusted publishing.
Simulator (wcc_sim)
simulate_field: Gaia DR3 cone search (cached on disk, astrometry propagated to the observation epoch, XHIP bright-star supplement), wcc-etc count rates per spectral template, oversampled PSF rendering with sub-pixel placement, the ETC noise model with full-well and ADC saturation, and a multi-extension FITS product (SCI,SATMASK,CAT,CLEAN) with a TAN WCS.PSF modes: in-focus Airy at each star’s effective wavelength, +1/+2-wave Zemax Huygens defocus, optional Gaussian jitter, spectrum-weighted chromatic PSFs.
Analytic diffraction-wing extension beyond the PSF stamp, and the measured scattered-light halo (azimuthally averaged stray-light profile) as an additive term that reaches across the whole array.
Extended sources: analytic Sersic components with reddening.
Detectors: Sony IMX455 (
zwo:*) and Hamamatsu HWK4123 qCMOS (qcmos:*, selectable gain mode); the per-frame saturation ceiling is recorded asSATLEVEL.wcc-simcommand line.
Photometry (wcc_phot)
Differential aperture and PSF photometry on a series of frames: target and reference selection, per-frame centroiding, quality flags, relative light curve, one-page diagnostic report, live viewer.
wcc-photcommand line.
Plotting
.plot_*methods onSimulatedField(plot,plot_cutout,plot_psf_profile,plot_satmask,psf_report) andPhotometryResult(plot,plot_lightcurve,plot_field,plot_binned_rms,plot_raw_fluxes,plot_rms_vs_mag,plot_centroids,plot_background,report), each takingax=Noneand returning the axes. The report panels behind them are public functions inwcc_sim.psfreportandwcc_phot.report;wcc_sim.plottingaddsplot_image,plot_stamp,plot_radial_profile,plot_encircled_energyfor plain arrays and ships the house style asplot_default.mplstyle(no user-installed style needed).Tutorial
10_plotting.ipynb; the other notebooks use the methods.
Validation
TRAPPIST-1b transit recovery and M101 Cepheid period-luminosity scripts.
Monte Carlo cross-check of the wcc-etc signal and noise prediction against simulated frames (
tests/test_etc_crosscheck.py).
Fixes from the September 2026 audit
qCMOS saturation ceiling (#17), Gaia synchronous-query truncation (#19), in-focus PSF wavelength (#20), synthetic BP-RP to template table with colour-interpolated rates (#21), input validation and edge cases (#22), catalog masks and spherical matching (#10), light-curve guards (#12), defocus PSF centring (#18, with wcc-etc), one delivered-frame contract
(ADU - bias) * gainfor objects and files (#11), recorded seed for unseeded runs and a stale-Gaia-cache warning (#24).
Documentation
Docs site carries the Schmidt Observatory System logo and the stock Read the Docs theme (the Schmidt Sciences stylesheet was never loaded). New glossary page; the index opens in plain words; the concepts diagram names each stage in words with the module beside it; the quickstart uses
field.plot(); the installation page lists the extras and no longer claims a wcc-etc 0.6.0 floor; the tutorials no longer name a personal conda kernel. Tutorial 01 is split into a short01_getting_startedand a02_verificationthat holds the assertions; the other tutorials are renumbered 03 to 10.The packaged scatter profile, its module docstring and the
SCATFILEheader card label the halo as the wcc-etc 450 nm scatter map instead of naming the ray-trace run.CITATION.cffremoved.