read#
- lsst.images.json.read(cls: type[T], target: str | ParseResult | ResourcePath | Path | ArchiveTree, **kwargs: Any) ReadResult#
Read an object from a JSON file.
Parameters#
- target
File to read (convertible to
lsst.resources.ResourcePath) or anserialization.ArchiveTreeto finish deserializing. If the latter, itsindirectlistwill be interpreted and then cleared.- **kwargs
Extra keyword arguments passed to
cls.deserialize(e.g.bboxfor image subset reads), matching the FITS and NDF backends.
Returns#
- ReadResult
A named tuple containing the deserialized object and any additional metadata or butler information saved alongside it.
Notes#
Supported types must implement
deserializeand_get_archive_tree_type(seeImagefor an example).