Skip to content

Commit

Permalink
Fix compression-option warnings in coadds test.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Nov 16, 2018
1 parent 044e286 commit 8c51ce4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions python/lsst/pipe/tasks/mocks/simpleMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,28 @@ def makeButlerLocation(cls, path, dataId, mapper, suffix=None, storage=None):
if suffix is None:
loc = super(ExposurePersistenceType, cls).makeButlerLocation(path, dataId, mapper, suffix=None,
storage=storage)
# Write options are never applicable for _sub, since that's only
# for read None of the values aside from the "NONE"s matter, but
# writing explicit meaningless values for all of them to appease
# afw is the price we pay for trying to write a non-CameraMapper
# Mapper. It'll all bet better with Gen3 (TM).
options = {
"compression.algorithm": "NONE",
"compression.columns": 0,
"compression.rows": 0,
"compression.quantizeLevel": 0.0,
"scaling.algorithm": "NONE",
"scaling.bzero": 0.0,
"scaling.bscale": 0.0,
"scaling.bitpix": 0,
"scaling.quantizeLevel": 0.0,
"scaling.quantizePad": 0.0,
"scaling.fuzz": False,
"scaling.seed": 0,
}
for prefix in ("image", "mask", "variance"):
for k, v in options.items():
loc.additionalData.set("{}.{}".format(prefix, k), v)
elif suffix == "_sub":
subId = dataId.copy()
bbox = subId.pop('bbox')
Expand Down

0 comments on commit 8c51ce4

Please sign in to comment.