LSSTApplications
18.1.0
LSSTDataManagementBasePackage
stack
Linux64
afw
18.1.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:1505
lsst::afw::fits::getAllowImageCompression
bool getAllowImageCompression()
Definition:
fits.cc:1507
Generated on Thu Aug 8 2019 20:20:05 for LSSTApplications by
1.8.13