LSSTApplications  20.0.0
LSSTDataManagementBasePackage
fitsContinued.py
Go to the documentation of this file.
1 __all__ = []
2 
3 from lsst.utils import continueClass
4 from .fits import (Fits, ImageWriteOptions, ImageCompressionOptions, ImageScalingOptions,
5  compressionAlgorithmToString, scalingAlgorithmToString)
6 
7 
8 @continueClass # noqa: F811
9 class Fits:
10  def __enter__(self):
11  return self
12 
13  def __exit__(self, cls, exc, traceback):
14  self.closeFile()
15 
16 
17 @continueClass # noqa: F811
19  def __repr__(self):
20  return f"{self.__class__.__name__}(compression={self.compression!r}, scaling={self.scaling!r})"
21 
22 
23 @continueClass # noqa: F811
25  def __repr__(self):
26  return (f"{self.__class__.__name__}(algorithm={compressionAlgorithmToString(self.algorithm)!r}, "
27  f"tiles={self.tiles.tolist()!r}, quantizeLevel={self.quantizeLevel:f})")
28 
29 
30 @continueClass # noqa: F811
32  def __repr__(self):
33  return (f"{self.__class__.__name__}(algorithm={scalingAlgorithmToString(self.algorithm)!r}, "
34  f"bitpix={self.bitpix}, maskPlanes={self.maskPlanes}, seed={self.seed} "
35  f"quantizeLevel={self.quantizeLevel}, quantizePad={self.quantizePad}, "
36  f"fuzz={self.fuzz}, bscale={self.bscale}, bzero={self.bzero})")
lsst::afw::fits::Fits
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:297
lsst::afw::fits::ImageCompressionOptions
Options for tile compression of image pixels.
Definition: fitsCompression.h:180
lsst::afw::fits::ImageWriteOptions
Options for writing an image to FITS.
Definition: fits.h:219
lsst::afw::fits::ImageScalingOptions
Options for scaling image pixels.
Definition: fitsCompression.h:355
lsst::utils
Definition: Backtrace.h:29