lsst-images v30.0.9 (2026-07-15)#
New Features#
Added the TEx PSF residual-ellipticity correlation metrics (
psfTE1e1throughpsfTE4ex, covering TE1-TE4 and their e1/e2/ex components) toObservationSummaryStats, synchronized fromlsst.afw.image.ExposureSummaryStats. (DM-46582)Butler metadata-component reads now cache the serialization tree of the most recently read dataset, so requesting several metadata components of one dataset (for example
sky_projectionthenobs_info) opens the file only once. Components that need pixel, table, or archive-pointer data still fall back to reading the file, decided at runtime by probing the tree with the newlsst.images.serialization.DetachedArchive.The butler formatter now understands a special
"components"component that returns several components from a singlegetas adictkeyed by component name. Pass acomponentsparameter listing the components to read; if it is omitted, all components are returned.Added a
lsst-images-admin fuzz-masked-imagesubcommand that shuffles the image, mask, and variance pixels of aMaskedImagewithin tiles so a file can be released as public test data. It reads any supported format, writes the format chosen by the output extension, and applies lossy RICE compression to the science planes for FITS output.Added
lsst.images.Mask.add_planes(and the single-plane convenienceadd_plane) to derive a newlsst.images.Maskwith mask planes added and/or dropped; it always reallocates the backing array, so views of the original mask are unaffected.lsst.images.MaskedImage.maskis now settable, so a grown mask can be assigned back to a masked image.Added
lsst.images.Image.from_hdu_listandlsst.images.MaskedImage.from_hdu_listto reconstruct anImageorMaskedImagefrom the cut-down FITS HDU lists written bydax_images_cutout(anlsst.imagesfile with its JSON-tree and index HDUs dropped), so they can be re-serialized as normallsst.imagesfiles. Reconstruction from a legacy (afw-written) mask keeps theMP_*mask-plane cards (re-indexed to the reshuffled schema) for legacy tooling; the normallsst.imagesreader strips them on read since the serialized schema is authoritative. (DM-55210)
Added difference kernel (
kernel) and provenance (templates) components toDifferenceImage. (DM-55220)Added a
lsst-images-admin diagramsubcommand that renders the composition layout of a serialization model (e.g.visit-imageorcell-coadd) as Mermaid, Graphvizdot, or an ASCIItree. By default it labels nodes with the public class names (Image,SkyProjection, …) and shows only model composition; pass--attributesto include scalar fields,--serialization-namesto use the raw model names,--collapse/--expand/--expand-leavesto tune which helper models are drawn, and--hide-field/--hide-typeto clip fields or whole types. With--from-fileit diagrams the concrete structure of a serialized file (reading only the reference tree, not pixels), collapsing unions such as the PSF to the type actually stored. (DM-55281)The generic
read_archiveandopen_archiveAPIs now accept a seekable binary stream in addition to a path, so in-memory data (e.g., a VO cutout service response) can be read without writing it to disk first:read_archive(io.BytesIO(data)). The format is identified from the stream’s leading bytes, with an optionalformatargument to override; compressed streams are rejected with an error telling the caller to decompress first. Paths with a.gzor.zstcompression suffix are decompressed transparently through a temporary file for all supported formats. Reading zstd-compressed files requires Python 3.14 or thezstandardpackage. (DM-55385)Added support for broadcasting, array-like inputs, and
XY/YXarguments to ufunc-like methods, includingBounds.contains,Transform.apply*, andBaseField.__call__.Added a
MaskSchema.interpretmethod for identifying which mask planes are set on a given pixel. (DM-55422)
API Changes#
The generic serialization entry points have been renamed:
lsst.images.serialization.readis nowread_archive,writeis nowwrite_archive, andopenis nowopen_archive. The old names have been removed outright; no deprecation aliases are provided. (DM-55421)Changed
CellCoadd.to_legacyAPI to return anlsst.afw.image.ExposureFto make it consistent with the other imaging classes. This allows for a consistent experience for the users where they do not have to check whether they have aVisitImageorCellCoaddto work out what the return type is going to be. The corollary of this change is that there is nowCellCoadd.to_legacy_cell_coadd.CellCoadd.to_legacy_exposurehas been removed with no deprecation period.The
lsst.images.Boxconstructor now raisesTypeErrorif its arguments are notIntervalinstances, instead of silently constructing a broken box. (DM-55488)
Bug Fixes#
Unified the logic for determination of multiple versions of a single extension, fixing overwrites in the NDF writer.
Added a name shrinker for NDF output to ensure that files written out can be read by the Starlink software tools (which limits structure and component names to 15 characters). (DM-55183)
Fixed read of bounding box cutouts for
VisitImageandDifferenceImage.Each HDU written to a
lsst.imagesFITS file now includes aDATEheader card recording the UTC time the header was created, as required by the FITS standard. (DM-55210)
Fixed reading of
.fits.gzfiles, which were dispatched to the FITS backend but handed to it still compressed.Fixed reading of
cell_aperture_correction_maparchives in a process that has not otherwise importedlsst.images.cells: the schema was missing from the built-in provider table and thelsst.images.schemasentry points, so the schema-driven lazy import could not find it. (DM-55385)
Fixed
lsst.images.SkyProjection.to_legacyfailing withNo frame with domain PIXELS foundfor projections created byfrom_fits_wcs, including projections read back from serialized files such as image cutouts.lsst.afw.geom.SkyWcsrequires the pixel frame’s AST domain to bePIXELS, while this package follows the AST/NDF convention ofPIXEL; the domain is now renamed in the converted copy. (DM-55488)
Miscellaneous Changes of Minor Interest#
Improved the performance of the FITS reader when accessing remote objects by ensuring that we only open the file once (previously it was opened once to find the relevant schema and then again to do the full read) across all backends and for FITS specifically we have increased the block size used by
fsspec. (DM-55217)Made generalized image
__getitem__(...)calls return a view, notself. (DM-55422)
lsst-images v30.0.8 (2026-06-09)#
New Features#
Added the
CellCoaddclass and format, as well as associated PSF and provenance types. (DM-54225)Added psf star shapelet decomposition parameters and metrics to the
ObservationSummaryStatsclass. (DM-54482)Added a
GeneralFrametype so we can represent transforms and projections where there are no identifiers (or none worth standardizing) for the pixel coordinate system. (DM-54555)Added
VisitImage.to_legacyfor conversion fromVisitImagetolsst.afw.image.Exposure. (DM-54556)Added schema versioning (
schema_version,min_read_version, computedschema_url) to every top-level Pydantic serialization model, and integer-major container-format stamps (FMTVERfor FITS,FORMAT_VERSIONfor NDF, plusDATAMODL/DATA_MODELschema-URL keywords). Files written before this change continue to read; absent stamps are interpreted as the v1 defaults. (DM-54557)Added the
DetectorandAmplifiersclasses, as well as adetectorcomponent forVisitImage. (DM-54558)Reworked the
Polygonclass into a two-type hierarchy (Regionis the new base class) that implements theBoundsprotocol, and added aboundsattribute toVisitImage. (DM-54559)Added the
fieldssubpackage, with 2-d Chebyshev, spline, product, and sum maps.These are intended as successors to the
lsst.afw.math.BoundedFieldandlsst.afw.math.BackgroundListtypes. (DM-54571)Added aperture corrections to
VisitImage. (DM-54572)Added
ObservationSummaryStatsas a class analogous to the legacyafwExposureSummaryStatsclass. This class is attached to theVisitImage.summary_statsproperty. (DM-54575)Added higher-order moment-based metrics (
coma1[2],trefoil1[2],kurtosis,e4_1, ande4_2) to theObservationSummaryStatsclass. (DM-54675)Added a
jsonsubpackage with support for pure JSON I/O (for small objects). (DM-54780)Added an experimental HDF5 file writer. The initial version supports Masked Image and Visit Image and uses the Starlink NDF data model layered on top of HDF5. The files created by this writer are compatible with all the Starlink software with the caveat that the Starlink software does not understand more than 8 mask bits and the Starlink software does not understand the
.MORE.LSSTextensions. The Starlink software will understand FITS headers and our full WCS.Unified the Butler formatters such that they now write the file format configured by the Butler datastore (defaulting to FITS) and will determine how to read the file based on the file extension. (DM-54817)
Added column for reference catalog source density (in number per degrees**2) to the
ObservationSummaryStatsclass. (DM-54866)Added a mapping of background models to
VisitImageandCellCoadd. (DM-54910)Added a
photometric_scalingcomponent toVisitImage. (DM-54912)Added the
DifferenceImageclass.Added
VisitImage.to_legacyand associated helpers and fixes.Includes a small modifications to the PIFF PSF serialization schema. (DM-55036)
Added aperture corrections and legacy conversions to
CellCoadd.Added support for FITS compression recipes in the butler formatter. (DM-55129)
Added the
lsst-images-admincommand-line tool (also runnable aspython -m lsst.images) withconvert(legacy FITS to a new format, for visit images, difference images, and cell coadds, with a--preserve-quantizationoption that is on by default),inspect(schema URL, container format version, and registered Python class),reformat(rewrite a file in a different container format, such as FITS to NDF),minify,extract-test-data, andverify-rewritesubcommands.Added
lsst.images.serialization.backend_for_pathandInputArchive.get_basic_infoas public APIs for resolving a backend by file suffix and reading basic archive information.Added
lsst.images.serialization.readandlsst.images.serialization.write, which dispatch by file suffix;readinfers the in-memory type from the file’s schema and returns the deserialized object directly. Also addedclass_for_schemaandpublic_type_for_schemafor looking up the registeredArchiveTreesubclass and the in-memory Python type for aschema_name.openandreadaccept an optionalclsargument that validates the deserialized type and narrows the static return type.Added
lsst.images.serialization.open, a context-manager reader for efficiently pulling an individual component (reader.get_component("projection")), the whole object (reader.read()), or the metadata and butler info stored alongside it, layered on the newInputArchive.open_treeprimitive.Added
GeneralizedImage.read(a classmethod) andGeneralizedImage.write, inherited byImage,Mask,MaskedImage,ColorImage,VisitImage, andDifferenceImage, as discoverable thin wrappers over the genericread/writefunctions. (DM-55131)
API Changes#
Removed the
obs_infocomponent fromImage,Mask, andMaskedImage, in favor of defining it directly onVisitImage.Fully unified the butler formatters into
lsst.images.formatters.GenericFormatterand deleted the old ones. (DM-54976)
Bug Fixes#
Bug fixes uncovered while strengthening round-trip tests:
CellPointSpreadFunctionSerializationModel.arraynow acceptsInlineArrayModelalongsideArrayReferenceModel, so aCellCoaddwhose PSF kernel gets inlined (e.g. via the JSON archive) round-trips through Pydantic again.The starlink-pyast
Objectwrapper now has a content-based__eq__(mirroring the structural equality already provided byastshim.Object), so twoFrameSets with identical content but different wrapper instances compare equal.assert_psfs_equalno longer self-intersectspsf1.bounds.bboxwhen picking default evaluation points, and comparesbounds.containssymmetrically rather than relying oncompute_kernel_imageto raise — robust forCellPointSpreadFunction, whose evaluation does not always raise on out-of-domain points. (DM-55089)
Miscellaneous Changes of Minor Interest#
Added structural equality and round-trip test helpers:
AmplifierCalibrations,Detector,CameraFrameSet, and theBaseFieldsubclasses (ChebyshevField,ProductField,SplineField,SumField) now define a content-based__eq__, so two instances that round-trip identically compare equal.New
assert_visit_images_equalandassert_cell_coadds_equalhelpers inlsst.images.testscover every type-specific attribute (PSF, detector, filter, summary stats, backgrounds, polygon bounds, cell grid, missing cells, patch/tract, band, …) so a single call now drives a full round-trip fidelity check.TemporaryButleraccepts aformat=keyword that overlays a per-storage-class formatter binding soGenericFormatterwrites the requested backend instead of falling back to its.fitsdefault — used by the round-trip helpers to ensure butler-path artifacts match the extension the test asserts against. (DM-55089)
Reworked how
ObservationInfois shared and serialized inMaskedImageand its subclasses. (DM-54555)Switched from 1-based to 0-based bit indexing in Mask FITS headers. (DM-54617)
Fixed models to support JSON Schema creation and validation. (DM-54987)
An API Removal or Deprecation#
Removed the per-backend
readandread_treefunctions (lsst.images.fits.read,lsst.images.json.read,lsst.images.ndf.read) and theread_fits/write_fitsmethods onImage,Mask, andMaskedImage, along with theReadResultreturn type. Use theread/writemethods on the image classes (or the genericlsst.images.serialization.read/writewith the optionalclsargument) for whole-object access, andlsst.images.serialization.openfor components, metadata, and butler info. Schema-less Starlink NDFs are now read withlsst.images.ndf.read_starlink. (DM-55131)
lsst-images v30.0.6 (2026-04-07)#
New Features#
Implemented
to_legacyconversion forTransformandProjection. (DM-54551)Added the
ColorImageclass and format for RGB images. (DM-54220)Added a flexible metadata dictionary and optional butler provenance to all top-level serialization models and generalized images. (DM-54285)
Added more slicing support to all generalized images, with
.localand.absoluteproxy properties to make the indexing conventions clearer. (DM-54292)Added
GaussianPointSpreadFunctionPSF class. (DM-54472)
Miscellaneous Changes of Minor Interest#
Improved the test coverage of the image classes. This uncovered some minor bugs that have also been fixed. (DM-54472)
lsst-images v30.0.4 (2026-03-02)#
First public release of package.