read#
- lsst.images.ndf.read(cls: type[T], path: str | ParseResult | ResourcePath | Path, **kwargs: Any) ReadResult#
Read an object from an NDF (HDS-on-HDF5) file.
If the file has a
/MORE/LSST/JSONtree it is used as the source of truth andcls.deserializeis invoked with the parsed model. Otherwise the reader falls back to auto-detection of a minimal recognised-component set (DATA_ARRAY,VARIANCE,QUALITY,MORE.FITS);WCSis logged-and-dropped in v1.Parameters#
- cls
Expected return type.
ImageandMaskedImageare the only types the auto-detect path can produce. The symmetric path accepts whatever the file’s discriminator says.- path
File path or
lsst.resources.ResourcePathExpression.- **kwargs
Forwarded to
cls.deserializeon the symmetric read path.
Returns#
ReadResult[T]Named tuple of (deserialized object, metadata, butler_info).