22from lsst.afw.fits import MemFileManager, ImageWriteOptions, ImageCompressionOptions
31 Intended to be used by the ``__reduce__`` method of a class.
36 any object
with a ``writeFits`` method taking a
42 reduced : `tuple` [callable, `tuple`]
43 a tuple
in the format returned by `~object.__reduce__`
47 table = getattr(obj, 'table',
None)
50 obj.writeFits(manager)
54 obj.writeFits(manager, options, options, options)
56 obj.writeFits(manager, options)
57 size = manager.getLength()
58 data = manager.getData()
59 return (unreduceFromFits, (obj.__class__, data, size))
65 Unpack data produced by `reduceToFits`. This method is used by the
66 pickling framework
and should
not need to be called
from user code.
71 the
class of object
to unpickle. Must have a
class-level ``readFits``
74 an
in-memory representation of the object, compatible
with
82 the object represented by ``data``
85 manager.setData(data, size)
86 return cls.readFits(manager)
Lifetime-management for memory that goes into FITS memory files.
A class to contain the data, WCS, and other information needed to describe an image of the sky.
A class to manipulate images, masks, and variance as a single object.
Base class for all tables.
def unreduceFromFits(cls, data, size)
Options for tile compression of image pixels.
Options for writing an image to FITS.