read#
- lsst.images.fits.read(cls: type[T], path: str | ParseResult | ResourcePath | Path, *, page_size: int = 144000, partial: bool | None = None, **kwargs: Any) ReadResult#
Read an object from a FITS file.
Parameters#
- path
File to read; convertible to
lsst.resources.ResourcePath.- page_size
Minimum number of bytes to read at at once. Making this a multiple of the FITS block size (2880) is recommended.
- partial
Whether we will be reading only some of the archive, or if memory pressure forces us to read it only a little at a time. If
False, the entire raw file may be read into memory up front. Defaults toTrueif any extra**kwargsare passed with values other thanNone, since those usually indicate that only some of the original object will be loaded.- **kwargs
Extra keyword arguments passed to
cls.deserialize.
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).