read_starlink#
- lsst.images.ndf.read_starlink(cls_, path)#
Reconstruct an
ImageorMaskedImagefrom a schema-less Starlink NDF.Files written by this package carry a
/MORE/LSST/JSONtree and are read through the genericlsst.images.serialization.read_archive/lsst.images.serialization.open_archive. A Starlink-produced NDF has no such tree and therefore no schema, so it cannot go through that path; this function auto-detects a minimal recognised-component set (DATA_ARRAY,VARIANCE,QUALITY,MORE.FITS) instead.WCSis reconstructed when possible; other components are logged-and-dropped.- Parameters:
cls – Expected return type;
ImageandMaskedImageare the only types the auto-detect path can produce.path (
str|ParseResult|ResourcePath|Path) – File path orlsst.resources.ResourcePathExpression.
- Returns:
The deserialized
clsinstance.- Return type:
- Raises:
ArchiveReadError – If the file has an LSST JSON tree (use the generic
read_archiveinstead) or no recognisedDATA_ARRAYcomponent.