From 6f75e5a61d6bdc077042b8e1d647e14a55c25e97 Mon Sep 17 00:00:00 2001 From: Sasha Rahlin Date: Sun, 19 Nov 2023 16:44:11 +1300 Subject: [PATCH] Add new pointing model adjustment parameters to OnlinePointingModel structure --- gcp/python/ARCExtractor.py | 13 ++++++++++--- gcp/python/InfluxDB.py | 7 +++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/gcp/python/ARCExtractor.py b/gcp/python/ARCExtractor.py index 710c20e6..6954907e 100644 --- a/gcp/python/ARCExtractor.py +++ b/gcp/python/ARCExtractor.py @@ -316,9 +316,16 @@ def UnpackTrackerPointingData(f): f['TrackerPointing'] = t p = core.G3MapVectorDouble() - p['tilts'] = np.asarray(board['tilts'], dtype=np.double) - p['flexure'] = np.asarray(board['flexure'], dtype=np.double) - p['fixedCollimation'] = np.asarray(board['fixedCollimation'], dtype=np.double) + + # core model parameters + for k in ["tilts", "flexure", "fixedCollimation"]: + p[k] = np.asarray(board[k], dtype=np.double) + kadj = k + "Adjust" + if kadj in board.keys(): + p[kadj] = np.asarray(board[kadj], dtype=np.double) + else: + p[kadj] = np.zeros_like(p[k]) + p['time'] = np.asarray(t.time, dtype=np.double) if 'linear_sensor_enabled' in board.keys(): p['linsensEnabled'] = np.asarray(board['linear_sensor_enabled'][0], dtype=np.double) diff --git a/gcp/python/InfluxDB.py b/gcp/python/InfluxDB.py index 38837ccf..0d5d2eb9 100644 --- a/gcp/python/InfluxDB.py +++ b/gcp/python/InfluxDB.py @@ -180,6 +180,13 @@ def build_field_list(fr): 'flexure_cos': ['OnlinePointingModel', 'flexure', 1, U.deg], 'fixed_collimation_x': ['OnlinePointingModel', 'fixedCollimation', 0, U.deg], 'fixed_collimation_y': ['OnlinePointingModel', 'fixedCollimation', 1, U.deg], + 'tilts_hr_angle_adjust': ['OnlinePointingModel', 'tiltsAdjust', 0, U.deg], + 'tilts_lat_adjust': ['OnlinePointingModel', 'tiltsAdjust', 1, U.deg], + 'tilts_el_adjust': ['OnlinePointingModel', 'tiltsAdjust', 2, U.deg], + 'flexure_sin_adjust': ['OnlinePointingModel', 'flexureAdjust', 0, U.deg], + 'flexure_cos_adjust': ['OnlinePointingModel', 'flexureAdjust', 1, U.deg], + 'fixed_collimation_x_adjust': ['OnlinePointingModel', 'fixedCollimationAdjust', 0, U.deg], + 'fixed_collimation_y_adjust': ['OnlinePointingModel', 'fixedCollimationAdjust', 1, U.deg], 'linsens_coeff_az': ['OnlinePointingModel', 'linsensCoeffs', 0, None], 'linsens_coeff_el': ['OnlinePointingModel', 'linsensCoeffs', 1, None], 'linsens_coeff_et': ['OnlinePointingModel', 'linsensCoeffs', 2, None],