[DAMD-67] Update PfsObject to track input visits in the OBSERVATIONS table Created: 17/Dec/19  Updated: 05/Jan/21  Resolved: 25/Mar/20

Status: Done
Project: Data Model
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: hassan Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by DAMD-68 datamodel.txt: include input visits i... Won't Fix
Relates
relates to PIPE2D-492 Miscellaneous changes to the 2D DRP p... Done
Story Points: 1
Sprint: 2DDRP-2021 A
Reviewers: hassan

 Description   

The PfsObject.OBSERVATIONS table needs to track the visits used to construct that PfsObject. Please update the code accordingly.



 Comments   
Comment by rhl [ 18/Dec/19 ]

The current code does track the visits, but it also includes other information (more accurately, it includes a string representation of the expanded dataId, looking like a python dict). The original datamodel was a binary table (CONFIG) with just the visits and pfsDesignId, but I think adding columns for 3 arms makes sense (I can certainly imagine times that we'll omit particular arms from the pfsObject), and adding the fiberId makes the lookup of e.g. the fibre position in the pfsConfig file easier.
price: do we need anything else in the dataId? I see things like:

{'field': 'OBJECT', 'dateObs': '2019-10-23', 'site': 'F', 'category': 'A', 'visit': 36, 'arm': 'b', 'spectrograph': 1, 'ccd': 0, 'filter': 'b', 'expTime': 900.0, 'dataType': 'OBJECT', 'taiObs': '2019-10-23', 'pfsDesignId': 1, 'slitOffset': 0.0}
Comment by price [ 26/Feb/20 ]

visit, spectrograph and arm are sufficient to specify an image, but in combination with the objId (known if we're talking about a pfsObject) the spectrograph isn't required (since it can be obtained from the pfsConfig). So I think visit and arm are sufficient.

I propose to have visit and arm columns, but keep the identity column as a useful convenience.

Comment by price [ 26/Feb/20 ]

rhl, would you mind signing off on this?

Comment by price [ 10/Mar/20 ]

rhl would like for us to include fiberId, spectrograph, pfsDesignId in addition to visit and arm.

Comment by price [ 12/Mar/20 ]

I took this opportunity to make things a lot more structured: removing the identity dict, and replacing it with a struct called Identity. I hope this will make things easier for users, who now no longer need to know the magic keywords visit, arm, spectrograph when they make a dataId; rather, the struct they need has the keywords in the API and the docs.

Comment by price [ 24/Mar/20 ]

I believe rhl agreed with the ideas. Will reassign the review to hassan so he can approve the implementation.

Comment by price [ 25/Mar/20 ]

Merged to master.

Generated at Sat Feb 10 15:33:54 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.