From 29bc5778466d162619f5c1c5885ada902899623d Mon Sep 17 00:00:00 2001 From: Brian Brondel Date: Thu, 17 Oct 2024 12:56:40 -0700 Subject: [PATCH 1/2] Switch altitude and zenith distance --- python/lsst/consdb/hinfo.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/lsst/consdb/hinfo.py b/python/lsst/consdb/hinfo.py index 42492208..dfed9ec7 100644 --- a/python/lsst/consdb/hinfo.py +++ b/python/lsst/consdb/hinfo.py @@ -174,12 +174,12 @@ def fp_region( "azimuth_start": "AZSTART", "azimuth_end": "AZEND", "azimuth": (mean, "AZSTART", "AZEND"), - "altitude_start": (ninety_minus, "ELSTART"), - "altitude_end": (ninety_minus, "ELEND"), - "altitude": (mean, (ninety_minus, "ELSTART"), (ninety_minus, "ELEND")), - "zenith_distance_start": "ELSTART", - "zenith_distance_end": "ELEND", - "zenith_distance": (mean, "ELSTART", "ELEND"), + "altitude_start": "ELSTART", + "altitude_end": "ELEND", + "altitude": (mean, "ELSTART", "ELEND"), + "zenith_distance_start": (ninety_minus, "ELSTART"), + "zenith_distance_end": (ninety_minus, "ELEND"), + "zenith_distance": (mean, (ninety_minus, "ELSTART"), (ninety_minus, "ELEND")), "exp_midpt": (tai_mean, "DATE-BEG", "DATE-END"), "exp_midpt_mjd": (mean, "MJD-BEG", "MJD-END"), "obs_start": (tai_convert, "DATE-BEG"), From 1bf6936790c3951478b2a67a9319fd0f7a6c2575 Mon Sep 17 00:00:00 2001 From: Brian Brondel Date: Thu, 17 Oct 2024 13:14:31 -0700 Subject: [PATCH 2/2] Fix flawed test --- tests/test_hinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_hinfo.py b/tests/test_hinfo.py index bfddd78d..705c0f4c 100644 --- a/tests/test_hinfo.py +++ b/tests/test_hinfo.py @@ -64,4 +64,4 @@ def test_process_resource(pg_engine): elstart = _header_lookup(header, "ELSTART") elend = _header_lookup(header, "ELEND") - assert 0.5 * (elstart + elend) == row.zenith_distance + assert 0.5 * (elstart + elend) == row.altitude