diff --git a/python/lsst/sims/catUtils/mixins/AstrometryMixin.py b/python/lsst/sims/catUtils/mixins/AstrometryMixin.py index 91470147a..d627b1a30 100644 --- a/python/lsst/sims/catUtils/mixins/AstrometryMixin.py +++ b/python/lsst/sims/catUtils/mixins/AstrometryMixin.py @@ -12,7 +12,6 @@ from lsst.sims.coordUtils.AstrometryUtils import appGeoFromICRS, observedFromAppGeo from lsst.sims.coordUtils.AstrometryUtils import observedFromICRS, calculatePupilCoordinates -from lsst.sims.coordUtils.AstrometryUtils import calculateGnomonicProjection from lsst.sims.coordUtils.CameraUtils import findChipName, calculatePixelCoordinates from lsst.sims.coordUtils.CameraUtils import calculateFocalPlaneCoordinates @@ -40,14 +39,6 @@ def get_galactic_coords(self): return numpy.array([glon,glat]) - - @compound('x_focal_nominal', 'y_focal_nominal') - def get_gnomonicProjection(self): - ra = self.column_by_name('raObserved') - dec = self.column_by_name('decObserved') - return calculateGnomonicProjection(ra, dec, obs_metadata=self.obs_metadata, - epoch=self.db_obj.epoch) - @compound('x_pupil','y_pupil') def get_pupilFromSky(self): """ diff --git a/tests/testAstrometryMixins.py b/tests/testAstrometryMixins.py index 4740f4c38..06bd6c249 100644 --- a/tests/testAstrometryMixins.py +++ b/tests/testAstrometryMixins.py @@ -11,7 +11,7 @@ from lsst.sims.catalogs.measures.instance import InstanceCatalog from lsst.sims.utils import ObservationMetaData, arcsecFromRadians from lsst.sims.coordUtils import observedFromAppGeo, calculatePupilCoordinates -from lsst.sims.coordUtils import calculateGnomonicProjection, calculateFocalPlaneCoordinates +from lsst.sims.coordUtils import calculateFocalPlaneCoordinates from lsst.sims.coordUtils import findChipName, calculatePixelCoordinates from lsst.sims.catalogs.generation.utils import myTestStars, makeStarTestDB, \ myTestGals, makeGalTestDB @@ -44,7 +44,7 @@ class testCatalog(InstanceCatalog,AstrometryStars,CameraCoords): """ catalog_type = 'test_stars' column_outputs=['id','raPhoSim','decPhoSim','raObserved','decObserved', - 'x_focal_nominal', 'y_focal_nominal', 'x_pupil','y_pupil', + 'x_pupil','y_pupil', 'chipName', 'xPix', 'yPix','xFocalPlane','yFocalPlane'] #Needed to do camera coordinate transforms. camera = camTestUtils.CameraWrapper().camera @@ -66,9 +66,12 @@ class testStellarCatalog(InstanceCatalog, AstrometryStars, CameraCoords): camera = camTestUtils.CameraWrapper().camera - column_outputs = ['glon', 'glat', 'x_focal_nominal', 'y_focal_nominal', - 'x_pupil', 'y_pupil', 'xPix', 'yPix', 'xFocalPlane', 'yFocalPlane', - 'chipName', 'raPhoSim', 'decPhoSim', 'raObserved', 'decObserved'] + column_outputs = ['glon', 'glat', + 'x_pupil', 'y_pupil', + 'xPix', 'yPix', + 'xFocalPlane', 'yFocalPlane', + 'chipName', 'raPhoSim', 'decPhoSim', + 'raObserved', 'decObserved'] class testGalaxyCatalog(InstanceCatalog, AstrometryGalaxies, CameraCoords): """ @@ -77,7 +80,7 @@ class testGalaxyCatalog(InstanceCatalog, AstrometryGalaxies, CameraCoords): camera = camTestUtils.CameraWrapper().camera - column_outputs = ['glon', 'glat', 'x_focal_nominal', 'y_focal_nominal', + column_outputs = ['glon', 'glat', 'x_pupil', 'y_pupil', 'xPix', 'yPix', 'xFocalPlane', 'yFocalPlane', 'chipName', 'raPhoSim', 'decPhoSim', 'raObserved', 'decObserved'] @@ -176,10 +179,12 @@ def testUtilityMethods(self): self.cat.write_catalog("AstrometryTestCatalog.txt") - dtype = [('id',int),('raPhoSim',float),('decPhoSim',float),('raObserved',float), - ('decObserved',float),('x_focal_nominal',float),('y_focal_nominal',float), - ('x_pupil',float),('y_pupil',float),('chipName',str,11),('xPix',float), - ('yPix',float),('xFocalPlane',float),('yFocalPlane',float)] + dtype = [('id',int), + ('raPhoSim',float), ('decPhoSim',float), + ('raObserved',float), ('decObserved',float), + ('x_pupil',float), ('y_pupil',float), ('chipName',str,11), + ('xPix',float), ('yPix',float), + ('xFocalPlane',float), ('yFocalPlane',float)] baselineData = numpy.loadtxt('AstrometryTestCatalog.txt', dtype=dtype, delimiter=';') @@ -235,15 +240,6 @@ def testUtilityMethods(self): self.assertTrue(numpy.isnan(xxtest)) self.assertTrue(numpy.isnan(yytest)) - gnomonTest = calculateGnomonicProjection(baselineData['raObserved'], - baselineData['decObserved'], obs_metadata=self.obs_metadata, - epoch=2000.0) - for (xxtest, yytest, xx, yy) in \ - zip(gnomonTest[0], gnomonTest[1], - baselineData['x_focal_nominal'], baselineData['y_focal_nominal']): - - self.assertAlmostEqual(xxtest,xx,6) - self.assertAlmostEqual(yytest,yy,6) nameTest = findChipName(xPupil=pupilTest[0], yPupil=pupilTest[1], epoch=self.cat.db_obj.epoch,