LSSTApplications
20.0.0
LSSTDataManagementBasePackage
stack
1a1d771
Linux64
afw
20.0.0
python
lsst
afw
fits
compression.py
Go to the documentation of this file.
1
__all__ = [
"imageCompressionDisabled"
]
2
3
from
contextlib
import
contextmanager
4
from
.fits
import
getAllowImageCompression, setAllowImageCompression
5
6
7
@contextmanager
8
def
imageCompressionDisabled
():
9
"""Create a context where FITS image compression is disabled.
10
11
The previous compression setting is restored on exit.
12
"""
13
old =
getAllowImageCompression
()
14
try
:
15
setAllowImageCompression
(
False
)
16
yield
17
finally
:
18
setAllowImageCompression
(old)
lsst::afw::fits.compression.imageCompressionDisabled
def imageCompressionDisabled()
Definition:
compression.py:8
lsst::afw::fits::setAllowImageCompression
void setAllowImageCompression(bool allow)
Definition:
fits.cc:1546
lsst::afw::fits::getAllowImageCompression
bool getAllowImageCompression()
Definition:
fits.cc:1548
Generated on Wed Jun 24 2020 18:10:01 for LSSTApplications by
1.8.18