Skip to content

Commit

Permalink
Add more structures to PatchInfo for unit testing cell-based coadds
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Nov 16, 2023
1 parent 9b2afb0 commit 003de4c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/assemble_coadd_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from lsst.meas.algorithms.testUtils import plantSources
from lsst.obs.base import MakeRawVisitInfoViaObsInfo
from lsst.pipe.tasks.coaddInputRecorder import CoaddInputRecorderConfig, CoaddInputRecorderTask
from lsst.skymap import Index2D, PatchInfo

__all__ = ["makeMockSkyInfo", "MockCoaddTestData"]

Expand All @@ -59,10 +60,15 @@ def makeMockSkyInfo(bbox, wcs, patch):
Patch geometry information.
"""

def getIndex():
return patch

patchInfo = pipeBase.Struct(getIndex=getIndex)
patchInfo = PatchInfo(
index=Index2D(0, 0),
sequentialIndex=patch,
innerBBox=bbox,
outerBBox=bbox,
tractWcs=wcs,
numCellsPerPatchInner=1,
cellInnerDimensions=(bbox.width, bbox.height),
)
skyInfo = pipeBase.Struct(bbox=bbox, wcs=wcs, patchInfo=patchInfo)
return skyInfo

Expand Down

0 comments on commit 003de4c

Please sign in to comment.