[DAMD-136] Datamodel reads in pfsDesign.guideStar objIds as 32bit not 64bit Created: 17/Sep/22  Updated: 25/Sep/22  Resolved: 18/Sep/22

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

Type: Bug Priority: Major
Reporter: hassan Assignee: hassan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1716 Reload pfs_design_agc table using fix... Done
relates to OBSPROC-28 duplication of objId in pfsDesign.gui... Done
Story Points: 1
Reviewers: price

 Description   

As pointed out by monodera in OBSPROC-28, the PfsDesign.fromFits() method reads in the objId as a 32-bit integer rather than a 64-bit integer, as defined in datamodel.txt.

This could lead to truncation issues when loading guide star data from PfsDesign or PfsConfig files. Please fix.



 Comments   
Comment by hassan [ 17/Sep/22 ]

Trivial fix. Added unit test to verify and also tested with Hilo /data/pfsDesign/pfsDesign-0x74f2c06289c9823d.fits as noted in OBSPROC-28, using following script:

from pfs.datamodel.pfsConfig import PfsDesign

a = PfsDesign.read(0x74f2c06289c9823d, dirName='.')
objId = a.guideStars.objId
assert(len(set(objId)) == len(objId))
print('ObjectIds are unique')
Comment by hassan [ 18/Sep/22 ]

https://github.com/Subaru-PFS/datamodel/pull/102 reviewed by Paul Price and accepted.

Comment by hassan [ 18/Sep/22 ]

merged to master.

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