[INSTRM-1008] Design and create operational database tables for A&G camera exposures Created: 10/Jun/20  Updated: 16/Oct/21  Resolved: 04/Oct/21

Status: Done
Project: Instrument control development
Component/s: ics_agccActor, spt_operational_database
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Yoshida, Hiroshige Assignee: chihyi
Resolution: Done Votes: 0
Labels: PFI
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1110 Factor out telescope and environmenta... Done
relates to INSTRM-1287 Add centroiding and Database interact... Done

 Description   

We need tables in the operational database to store information about A&G camera exposures and parameters of detected candidate guide stellar objects by the AGCC actor. We may be able to model the tables after those for MCS and start our discussion with something like the following two tables:

1. agc_exposure table

  • frame_id (int4 or int8)
  • pfs_visit_id (int4)
  • exptime (float4)
  • taken_at (timestamp)
  • azimuth (float4)
  • altitude (float4)
  • inr (float4)
  • adc (float4)

2. agc_data table

  • frame_id (int4 or int8)
  • camera_id (int2)
  • spot_id (int2)
  • image_moment_00 (float4)
  • centroid_x or image_moment_10 (float4)
  • centroid_y or image_moment_01 (float4)
  • central_image_moment_11 (float4)
  • central_image_moment_20 (float4)
  • central_image_moment_02 (float4)
  • (TBD for higher order central image moments)
  • peak_pixel_x (int2)
  • peak_pixel_y (int2)
  • peak_intensity (int2?)
  • background (float4)


 Comments   
Comment by chihyi [ 27/Jul/20 ]

Those two tables look fine. Two questions:

  • Do we need higher order moments?
  • What' the definition for spot_id? I suppose that AGCC actor will received the info for guiding stars, and also spot_ids?
Comment by Yoshida, Hiroshige [ 28/Jul/20 ]
  • We won't need higher order moments.
  • The spot_id is meant to be a per-camera object identifier.
Comment by chihyi [ 28/Jul/20 ]

Is spot_id determined by AGCC? That is, find all spots and add a number from 1 to #spots to those spots.

Comment by Yoshida, Hiroshige [ 28/Jul/20 ]

Yes. That is what I had in my mind (per camera though).

Comment by naoyuki.tamura [ 24/Aug/20 ]

During the ICS/PFI+MCS telecon on Aug 21 2021 (https://sumire.pbworks.com/w/page/141057852/ICS-PFI-MCS%20telecon%20on%20Aug%2021%202020), we discussed this ticket and agreed no major issues are seen in the proposal and discussions are converged, so we can go ahead to make them a part of updated schema.
But there was a comment that a field should be a description of what it is, not how it is calculated so that the algorithm can always be changed later if required.
Presumably in general changing the naming later would be more difficult, so perhaps we should try to make right choices and decisions to make sure all fields describe what they are, not indicating implemented algorithms?

Comment by Yoshida, Hiroshige [ 10/Nov/20 ]

I would like to update the proposal for the "agc_exposure" table by following more closely to the data model of the "mcs_exposure" table and adding the following columns - dome_temperature, dome_humidity, dome_pressure, outside_temperature, outside_humidity, and outside_pressure. 

1. agc_exposure table

  • frame_id (int4 or int8)
  • pfs_visit_id (int4)
  • exptime (float4)
  • taken_at (timestamp)
  • azimuth (float4)
  • altitude (float4)
  • inr (float4)
  • adc (float4)
  • dome_temperature (float4)
  • dome_humidity (float4)
  • dome_pressure (float4)
  • outside_temperature (float4)
  • outside_humidity (float4)
  • outside_pressure (float4)
Comment by cloomis [ 13/Nov/20 ]

I was hoping we could pull the environmental columns out from the SPS/AGC/MCS systems and put them in a common table. I still think we can: have the Gen2 actor add a row for each SPS visit and AGC/MCS exposure.

Comment by Yoshida, Hiroshige [ 13/Nov/20 ]

Yes for normalization. Not sure about who should populate that table - Gen2 actor if it always knows when AGC/MCS/SPS exposures start and end and when to fetch and insert those environmental data.

Comment by Yoshida, Hiroshige [ 19/Apr/21 ]

The following is an updated proposal for AG data table schemas. M2-POS3 was added and atmospheric conditions inside the dome were removed from the proposed agc_exposure table, and a spot location flag was added to the proposed agc_data table. If we decide to normalize, azimuth, altitude, inr, adc, m2_pos3, outside_temperature, outside_humidity, and outside_pressure would go into a separate table.

agc_exposure table

  • frame_id (int4 or int8)
  • pfs_visit_id (int4)
  • exptime (float4)
  • taken_at (timestamp)
  • azimuth (float4)
  • altitude (float4)
  • inr (float4)
  • adc (float4)
  • m2_pos3 (float4)
  • dome_temperature (float4)
  • dome_humidity (float4)
  • dome_pressure (float4)
  • outside_temperature (float4)
  • outside_humidity (float4)
  • outside_pressure (float4)

agc_data table

  • frame_id (int4 or int8)
  • camera_id (int2)
  • spot_id (int2)
  • image_moment_00 (float4)
  • centroid_x or image_moment_10 (float4)
  • centroid_y or image_moment_01 (float4)
  • central_image_moment_11 (float4)
  • central_image_moment_20 (float4)
  • central_image_moment_02 (float4)
  • (TBD for higher order central image moments)
  • peak_pixel_x (int2)
  • peak_pixel_y (int2)
  • peak_intensity (int2? or int4)
  • background (float4)
  • spot_loc (int2?)  # flag to indicate where on the detector the spot was detected (e.g., stepped window side, non-stepped window side, straddling step, close to edge)
Comment by hassan [ 13/Aug/21 ]

Yoshida, HiroshigeKiyoto Yabe: can this ticket be closed now?

Comment by Kiyoto Yabe [ 04/Oct/21 ]

The ticket has been merged, so I close this and file a new tickets if any further fix is needed.

Generated at Sat Feb 10 16:30:56 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.