Reader#
- class lsst.images.serialization.Reader(archive: InputArchive[Any], tree: ArchiveTree, info: ArchiveInfo, expected_cls: type[T] | None)#
Bases:
GenericA handle to an open
lsst.imagesfile.Returned by
open. Lets the caller pull individual components, or the whole object, out of a file that is opened once; the underlying archive caches dereferenced pointers so repeated reads share work. Valid only inside thewithblock that produced it.Attributes Summary
Butler dataset info stored with the object, or
None.Schema name/version/url and format version for this file.
Flexible metadata stored with the object.
Methods Summary
get_component(name, **kwargs)Deserialize and return a single named component.
get_tree()Return the validated on-disk tree for advanced, low-level access.
read(**kwargs)Deserialize and return the whole object.
Attributes Documentation
- butler_info#
Butler dataset info stored with the object, or
None.
- info#
Schema name/version/url and format version for this file.
- metadata#
Flexible metadata stored with the object.
Methods Documentation
- get_component(name: str, **kwargs: Any) Any#
Deserialize and return a single named component.
Raises
InvalidComponentErrorfor an unknown component name.
- get_tree() ArchiveTree#
Return the validated on-disk tree for advanced, low-level access.
Most callers want
readorget_componentinstead; the tree is the raw deserialization model that those methods build on.
- read(**kwargs: Any) T#
Deserialize and return the whole object.