Skip to content

Commit 83da4df

Browse files
authored
Merge pull request #236 from lsst/tickets/DM-16082
DM-16082: Fix compression-option warnings in coadds test.
2 parents 044e286 + a344fe6 commit 83da4df

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

python/lsst/pipe/tasks/mocks/simpleMapper.py

+22
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,28 @@ def makeButlerLocation(cls, path, dataId, mapper, suffix=None, storage=None):
9595
if suffix is None:
9696
loc = super(ExposurePersistenceType, cls).makeButlerLocation(path, dataId, mapper, suffix=None,
9797
storage=storage)
98+
# Write options are never applicable for _sub, since that's only
99+
# for read. None of the values aside from the "NONE"s matter, but
100+
# writing explicit meaningless values for all of them to appease
101+
# afw is the price we pay for trying to write a non-CameraMapper
102+
# Mapper. It'll all get better with Gen3 (TM).
103+
options = {
104+
"compression.algorithm": "NONE",
105+
"compression.columns": 0,
106+
"compression.rows": 0,
107+
"compression.quantizeLevel": 0.0,
108+
"scaling.algorithm": "NONE",
109+
"scaling.bzero": 0.0,
110+
"scaling.bscale": 0.0,
111+
"scaling.bitpix": 0,
112+
"scaling.quantizeLevel": 0.0,
113+
"scaling.quantizePad": 0.0,
114+
"scaling.fuzz": False,
115+
"scaling.seed": 0,
116+
}
117+
for prefix in ("image", "mask", "variance"):
118+
for k, v in options.items():
119+
loc.additionalData.set("{}.{}".format(prefix, k), v)
98120
elif suffix == "_sub":
99121
subId = dataId.copy()
100122
bbox = subId.pop('bbox')

0 commit comments

Comments
 (0)