write#
- lsst.images.fits.write(obj: ~typing.Any, filename: str, compression_options: ~collections.abc.Mapping[str, ~lsst.images.fits._common.FitsCompressionOptions | None] | None = None, update_header: ~collections.abc.Callable[[~astropy.io.fits.header.Header], None] = <function no_header_updates>, compression_seed: int | None = None, metadata: dict[str, MetadataValue] | None = None, butler_info: ~lsst.images.serialization._common.ButlerInfo | None = None) Any#
Write an object with a
serializemethod to a FITS file.Parameters#
- filename
Name of the file to write to. Must not already exist.
- compression_options
Options for how to compress the FITS file, keyed by the name of the attribute (with JSON pointer
/separators for nested attributes).- update_header
A callback that will be given the primary HDU FITS header and an opportunity to modify it.
- compression_seed
A FITS tile compression seed to use whenever the configured compression seed is
Noneor (for backwards compatibility)0. This value is then incremented every time it is used.- metadata
Additional metadata to save with the object. This will override any flexible metadata carried by the object itself with the same keys.
- butler_info
Butler information to store in the file.
Returns#
serialization.ArchiveTreeThe serialized representation of the object.