Skip to content

Commit

Permalink
Merge branch 'tickets/DM-27177'
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Jun 8, 2022
2 parents d1989fe + 99b458d commit e2d134c
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 23 deletions.
2 changes: 1 addition & 1 deletion python/lsst/jointcal/jointcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def _readDataId(self, butler, dataId):
photoCalib=butler.get('calexp_photoCalib', dataId=dataId),
wcs=butler.get('calexp_wcs', dataId=dataId),
bbox=butler.get('calexp_bbox', dataId=dataId),
filter=butler.get('calexp_filterLabel', dataId=dataId))
filter=butler.get('calexp_filter', dataId=dataId))

def loadData(self, dataRefs, associations, jointcalControl):
"""Read the data that jointcal needs to run. (Gen2 version)"""
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/jointcal/testUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def createFakeCcdImage(butler, visit, num, fluxFieldName,
visitInfo = fakeVisitInfo if fakeVisitInfo is not None else butler.get('calexp.visitInfo', dataId=dataId)
bbox = butler.get('calexp.bbox', dataId=dataId)
detector = butler.get('calexp.detector', dataId=dataId)
filt = butler.get("calexp.filter", dataId=dataId).getName()
filt = butler.get("calexp.filter", dataId=dataId).bandLabel
photoCalib = lsst.afw.image.PhotoCalib(photoCalibMean, photoCalibErr)

catalog = createFakeCatalog(num, bbox, fluxFieldName, skyWcs=skyWcs)
Expand Down
4 changes: 0 additions & 4 deletions tests/jointcalTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ def setUp_base(self,

self.outputDataId = outputDataId

# Ensure that the filter list is reset for each test so that we avoid
# confusion or contamination from other instruments.
lsst.obs.base.FilterDefinitionCollection.reset()

self.set_output_dir()

def tearDown(self):
Expand Down
7 changes: 1 addition & 6 deletions tests/test_astrometryModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import lsst.afw.geom
import lsst.afw.table
import lsst.afw.image
import lsst.afw.image.utils
import lsst.geom
import lsst.log

Expand Down Expand Up @@ -104,10 +103,6 @@ def setUp(self):
config.load(os.path.join(os.path.dirname(__file__), "config/config.py"))
sourceSelector = config.sourceSelector.target(config=config.sourceSelector['science'])

# Ensure that the filter list is reset for each test so that we avoid
# confusion or contamination each time we create a cfht camera below.
lsst.afw.image.utils.resetFilters()

# jointcal's cfht test data has 6 ccds and 2 visits.
self.visits = [849375, 850587]
self.detectors = [12, 13, 14, 21, 22, 23]
Expand Down Expand Up @@ -138,7 +133,7 @@ def setUp(self):
ccdId = detector.getId()
wcs = butler.get('calexp.wcs', dataId=dataId)
bbox = butler.get('calexp.bbox', dataId=dataId)
filt = butler.get('calexp.filterLabel', dataId=dataId)
filt = butler.get('calexp.filter', dataId=dataId)
filterName = filt.physicalLabel
photoCalib = lsst.afw.image.PhotoCalib(100.0, 1.0)

Expand Down
3 changes: 0 additions & 3 deletions tests/test_ccdImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ class CcdImageTestCase(lsst.utils.tests.TestCase):
def setUp(self):
self.nStars1 = 4
self.nStars2 = 100
# Ensure that the filter list is reset for each test so that we avoid
# confusion or contamination each time we create a cfht camera below.
lsst.obs.base.FilterDefinitionCollection.reset()
struct = testUtils.createTwoFakeCcdImages(num1=self.nStars1, num2=self.nStars2)
self.ccdImage1 = struct.ccdImageList[0]
self.ccdImage2 = struct.ccdImageList[1]
Expand Down
4 changes: 0 additions & 4 deletions tests/test_jointcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ def test_extract_detector_catalog_from_visit_catalog(self):

class JointcalTestBase:
def setUp(self):
# Ensure that the filter list is reset for each test so that we avoid
# confusion or contamination each time we create a cfht camera below.
lsst.obs.base.FilterDefinitionCollection.reset()

struct = lsst.jointcal.testUtils.createTwoFakeCcdImages(100, 100)
self.ccdImageList = struct.ccdImageList
# so that countStars() returns nonzero results
Expand Down
4 changes: 0 additions & 4 deletions tests/test_photometryModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ class PhotometryModelTestBase:
unittest to use the test_* methods in this class.
"""
def setUp(self):
# Ensure that the filter list is reset for each test so that we avoid
# confusion or contamination each time we create a cfht camera below.
lsst.obs.base.FilterDefinitionCollection.reset()

struct = lsst.jointcal.testUtils.createTwoFakeCcdImages(100, 100)
self.ccdImageList = struct.ccdImageList
self.camera = struct.camera
Expand Down

0 comments on commit e2d134c

Please sign in to comment.