Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace afwGeom with geom #14

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/lsst/fgcmcal/fgcmBuildStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.afw.table as afwTable
import lsst.afw.geom as afwGeom
import lsst.geom as geom
from lsst.daf.base.dateTime import DateTime
import lsst.daf.persistence.butlerExceptions as butlerExceptions
from lsst.meas.algorithms.sourceSelector import sourceSelectorRegistry
Expand Down Expand Up @@ -476,7 +476,7 @@ def _fillVisitCatalog(self, butler, visitCat, srcVisits, srcCcds):
List of source CCDs
"""

bbox = afwGeom.BoxI(afwGeom.PointI(0, 0), afwGeom.PointI(1, 1))
bbox = geom.BoxI(geom.PointI(0, 0), geom.PointI(1, 1))

# now loop over visits and get the information
for i, srcVisit in enumerate(srcVisits):
Expand Down
5 changes: 2 additions & 3 deletions python/lsst/fgcmcal/fgcmFitCycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.afw.table as afwTable
import lsst.afw.geom as afwGeom
import lsst.afw.cameraGeom as afwCameraGeom
import lsst.geom

Expand Down Expand Up @@ -979,7 +978,7 @@ def _loadCcdOffsets(self, butler):
('X_SIZE', 'i4'),
('Y_SIZE', 'i4')])

extent = afwGeom.Extent2D(self.config.pixelScale, self.config.pixelScale)
extent = lsst.geom.Extent2D(self.config.pixelScale, self.config.pixelScale)

for i, detector in enumerate(camera):
# new version, using proper rotations
Expand All @@ -1002,7 +1001,7 @@ def _loadCcdOffsets(self, butler):
ccdOffsets['DELTA_DEC'][i] = -pointXform.getX() * self.config.pixelScale / 3600.0

# but this does not (for the delta)
boxXform = xform.applyForward(afwGeom.Point2D(bbox.getMaxX(), bbox.getMaxY()))
boxXform = xform.applyForward(lsst.geom.Point2D(bbox.getMaxX(), bbox.getMaxY()))
ccdOffsets['RA_SIZE'][i] = 2. * np.abs(boxXform.getY() -
pointXform.getY()) / 3600.0
ccdOffsets['DEC_SIZE'][i] = 2. * np.abs(boxXform.getX() -
Expand Down
6 changes: 3 additions & 3 deletions tests/fgcmcalTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import glob

import lsst.daf.persistence as dafPersistence
import lsst.afw.geom as afwGeom
import lsst.geom as geom
import lsst.log
from lsst.meas.algorithms import LoadIndexedReferenceObjectsTask, LoadIndexedReferenceObjectsConfig
import lsst.afw.image as afwImage
Expand Down Expand Up @@ -379,7 +379,7 @@ def _testFgcmOutputProducts(self, visitDataRefName, ccdDataRefName, filterMappin

testTrans = butler.get('transmission_atmosphere_fgcm',
dataId={visitDataRefName: visitCatalog[0]['visit']})
testResp = testTrans.sampleAt(position=afwGeom.Point2D(0, 0),
testResp = testTrans.sampleAt(position=geom.Point2D(0, 0),
wavelengths=lutCat[0]['atmLambda'])

# The test fit is performed with the atmosphere parameters frozen
Expand All @@ -396,7 +396,7 @@ def _testFgcmOutputProducts(self, visitDataRefName, ccdDataRefName, filterMappin
# difference so they aren't identical
testTrans2 = butler.get('transmission_atmosphere_fgcm',
dataId={visitDataRefName: visitCatalog[1]['visit']})
testResp2 = testTrans2.sampleAt(position=afwGeom.Point2D(0, 0),
testResp2 = testTrans2.sampleAt(position=geom.Point2D(0, 0),
wavelengths=lutCat[0]['atmLambda'])
self.assertFloatsAlmostEqual(testResp, testResp2, atol=1e-4)

Expand Down