simonsobs / socs

Simons Observatory specific OCS agents.
BSD 2-Clause "Simplified" License
12 stars 12 forks source link

Fix 'encoder_data' field when storing session.data #621

Closed BrianJKoopman closed 5 months ago

BrianJKoopman commented 5 months ago

Description

This fixes the field name used to store 'encoder_data' in session.data. This should now match the documented structure.

Motivation and Context

When testing sorunlib functionality at site with satp1 I found the session.data didn't have the expected field that I was trying to pull 'last_updated' from.

{
  "fields": {
    "irig_data": {
      "last_updated": 0,
      "irig_time": 0,
      "rising_edge_count": 0,
      "edge_diff": 0,
      "irig_sec": 0,
      "irig_min": 0,
      "irig_hour": 0,
      "irig_day": 0,
      "irig_year": 0
    },
    "encoder_data": {},
    "timestamp": 0,
    "enc_data": {
      "last_updated": 1706047078.7213721,
      "quadrature": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "pru_clock": [
        152196144698317,
        152196154698448,
        152196164698596,
        152196174698727,
        152196184698875,
        152196194699006,
        152196204699154,
        152196214699285,
        152196224699433,
        152196234699564,
        152196244699712
      ],
      "reference_degree": [
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077,
        132.9923076923077
      ],
      "error": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ]
    }
  },
  "timestamp": 1706047087.8708746
}

How Has This Been Tested?

Not yet tested.

Types of changes

Checklist: