Skip to content

Commit

Permalink
Fix error in calculation of zenith distance
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsaunders committed Jun 4, 2021
1 parent 0deb56d commit c208d87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/lsst/pipe/tasks/computeExposureSummaryStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def run(self, exposure, sources, background):
warnings.simplefilter('ignore')
altaz = coord.transform_to(AltAz)

zenithDistance = altaz.alt.degree
zenithDistance = 90.0 - altaz.alt.degree
else:
zenithDistance = np.nan

Expand Down
2 changes: 1 addition & 1 deletion tests/test_computeExposureSummaryStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def testComputeExposureSummary(self):

self.assertFloatsAlmostEqual(summary.meanVar, skySigma**2.)

self.assertFloatsAlmostEqual(summary.zenithDistance, 59.42888, atol=1e-5)
self.assertFloatsAlmostEqual(summary.zenithDistance, 30.57112, atol=1e-5)


class MyMemoryTestCase(lsst.utils.tests.MemoryTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_processCcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def testProcessCcd(self):
("summary_psfArea", summary.psfArea, 38.63468352371086),
("summary_ra", summary.ra, 78.85551507080474),
("summary_decl", summary.decl, -9.800258687592303),
("summary_zenithDistance", float('%.6f' % (summary.zenithDistance)), 47.638999),
("summary_zenithDistance", float('%.6f' % (summary.zenithDistance)), 42.361001),
("summary_zeroPoint", summary.zeroPoint, 30.940228147639207),
("summary_skyBg", summary.skyBg, 191.4352211728692),
("summary_skyNoise", summary.skyNoise, 12.512330367008024),
Expand Down

0 comments on commit c208d87

Please sign in to comment.