[DAMD-62] Change filenameFormat for pfsObject or update datamodel.txt Created: 25/Jun/19  Updated: 30/Aug/19  Resolved: 28/Aug/19

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

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

Story Points: 2
Sprint: 2DDRP-2019 F, 2DDRP-2019 G
Reviewers: price

 Description   

I noticed that the filename format for pfsObject (and pfsSingle and pfsReference as well) described in drp.py is

"pfsObject-%(catId)03d-%(tract)05d-%(patch)s-%(objId)016x-%(nVisit)03d-%(pfsVisitHash)016x.fits"

, but, according to datamodel.txt, it should be

"pfsObject-%05d-%s-%03d-%016x-%03d-0x%016x.fits" % (tract, patch, catId, objId, nVisit % 1000, pfsVisitHash)

(I mean the location of catId is different)

Could tell me which one is correct?



 Comments   
Comment by hassan [ 27/Jun/19 ]

The definition in datamodel.txt is correct. I will update the formats in drp.py accordingly.

Comment by hassan [ 27/Jun/19 ]

Initial fix pushed to branch. Unit test being considered.

Comment by price [ 26/Jul/19 ]

I think that the fix should be to change datamodel.txt, not the code. The reason for this is sorting: catId is the most fundamental discriminator between spectra (e.g., it's the difference between a galactic archeology target and a high-z quasar target) and should therefore be listed first in the filename so that a sorted list of files will group the common catId files together.

Comment by rhl [ 26/Jul/19 ]

The version in the datamodel.txt is correct by definition, so the drp.py should have conformed. If we wanted to move the catId to the front, that should have been filed as a DAMD ticket before the change was made.

I agree that the change is reasonable (especially as while most PFS SSP targets will come from HSC, and thus have catId==1 the GA ones will not). In the interest of efficiency let us take this ticket as the one that proposes the change. Normally this would come up for discussion at the DRP meeting where we discuss both 1-D and 2-D, but if hassan chooses I think we can make this decision in a less formal way as the codebase is already broken and LAM is about to be off for the month of Août.

Comment by hassan [ 26/Jul/19 ]

Proposal from price agreed: catId will now be the first element of the file name.

datamodel.txt and the code base need to be updated accordingly as part of this ticket.

Comment by hassan [ 28/Aug/19 ]

Fixed in 15d0cf0.

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