New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: DAMD-137 (proper motion and parallax in pfsDesign and pfsConfig) #117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable, but there need to be some changes before merging. In particular, test_PfsFluxReference.py fails due to this change, and I'm sure there must be similar failures in drp_stella.
datamodel.txt
Outdated
| @@ -385,6 +385,10 @@ The DESIGN table lists for each object: | |||
| targetType 32-bit int (enumerated type: e.g. SCIENCE,SKY,FLUXSTD) | |||
| fiberStatus 32-bit int (enumerated type: e.g. GOOD,BROKENFIBER,BLOCKED,BLACKSPOT) | |||
| pfiNominal pair of 32-bit floats (millimeters on the PFI) | |||
| epoch 7-digit string | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the meaning of the "7-digit string"? Can you give an example? Wouldn't a floating-point MJD or similar be faster, since strings require parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied it from the explanation in the guide star table which was written by someone before. It's something like "J2000.0".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "7-character string" would be more accurate. "Digit" implies solely numbers.
python/pfs/datamodel/pfsConfig.py
Outdated
| @@ -176,6 +186,10 @@ class PfsDesign: | |||
| "catId": "J", | |||
| "objId": "K", | |||
| "targetType": "J", | |||
| "epoch": "A", | |||
| "pmRa": "D", | |||
| "pmDec": "D", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have previously specified these as single-precision floats, but are saving them as double-precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it to "E".
I actually copied from guideStars.py and it also has apparently inconsistent definitions (at lines around 138).
Column("pmRa", "D", array=self.pmRa, unit='mas/year'),
Column("pmDec", "D", array=self.pmDec, unit='mas/year'),
Column("parallax", "E", array=self.parallax, unit='mas'),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you fix those (in a separate commit) while you're in there, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/pfs/datamodel/pfsConfig.py
Outdated
| @@ -998,6 +1027,10 @@ class PfsConfig(PfsDesign): | |||
| "catId": "J", | |||
| "objId": "K", | |||
| "targetType": "J", | |||
| "epoch": "A", | |||
| "pmRa": "D", | |||
| "pmDec": "D", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
|
I fixed |
|
They will need to be fixed before merging. |
|
Could you please let me know which files should I look at in drp_stella? (I'm a bit overwhelmed by the large codebase...) |
|
The best way would be to run the tests ( |
|
I did the test and made modifications accordingly. The corresponding PRs have been made in |
- Add `epoch`, `pmRa`, `pmDec`, and `parallax` for targets in the DESIGN table of pfsDesign and pfsConfig with the same formats as those in the GUIDESTAR table. - Modify `datamodel.txt` and `tests_PfsConfig.py` accordingly.
epoch,pmRa,pmDec, andparallaxfor targets in the DESIGN table of pfsDesign and pfsConfig with the same formats as those in the GUIDESTAR table.datamodel.txtandtests_PfsConfig.pyaccordingly.