Skip to content

Commit a7321be

Browse files
committed
feat: add a lat pointing model test
1 parent 9a62271 commit a7321be

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_pointing_model.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,22 @@ def tpoint_base_tilt(an, aw, az, el):
145145
assert(abs(sig_meas - sig * DEG) < .001*DEG)
146146

147147

148+
def test_lat_v1(self):
149+
az, el, roll = full_vectors(az=np.linspace(-90, 90, 100),
150+
el=60)
151+
params = {'version': 'lat_v1'}
152+
az1, el1, roll1 = to_deg(*pm.model_lat_v1(params, *to_rad(az, el, roll)))
153+
154+
# Backwards compatibility for not providing el sag or base tilt
155+
params['enc_offset_az'] = 1. * DEG
156+
az1, el1, roll1 = to_deg(*pm.model_lat_v1(params, *to_rad(az, el, roll)))
157+
assert np.all(center_branch(az1 - az) > 0)
158+
159+
# Try an el sag
160+
params['el_sag_lin'] = 1
161+
az2, el2, roll2 = to_deg(*pm.model_lat_v1(params, *to_rad(az, el, roll)))
162+
assert np.all(np.isclose(el2, 0))
163+
164+
148165
if __name__ == '__main__':
149166
unittest.main()

0 commit comments

Comments
 (0)