-
Notifications
You must be signed in to change notification settings - Fork 25
Implement Pan-STARRS manual photometry and proper motion ingestion #628
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
Implement Pan-STARRS manual photometry and proper motion ingestion #628
Conversation
|
The ingest_photometry script looks good! Is it faster? Discuss with @canavarrete01 the best way to move forward modifying and reviewing so many JSON files. |
|
yes! speedup for ~2 seconds per 100 rows. Also, I didn’t manually ingest the proper motion data as the runtime not change as much. |
|
I went through the Pan-STARRS data and everything looks good. ~2,080 sources are valid for ingesting into schema. |
| logger.warning(msg) | ||
| continue |
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.
keep track of the sources which did not find matches.
|
Awesome! Thinking about this, I think the best way to review this data before we ingest to the database is to make a CSV file. So, instead of ingesting the matches, let's add to a CSV file. and then I can review that table and THEN you can ingest the photometry from that table. |
|
It might be faster to write the CSV files as you go through the loop rather than using eg, with open('photometry_data.csv', 'w') as phot_data:
data_writer = csv.DictWriter(phot_data, fieldnames=[blah])
data_writer.writerows(photometry_data)
|
|
Things that have changed and needs review:
|
|
Make sure to update branch and then your branch should be ready to be merged! |
|
Also update the PR name -- it's just photometry, And let's also update the versions table and do a release once this PR is merged. |
|
…tps://github.com/SIMPLE-AstroDB/SIMPLE-db into Ingesting-PanSTARRS-Photometry-and-Proper-Motion :wq
tests/test_data.py
Outdated
| # Test for Best18 proper motions added from Pan-STARRS catalog | ||
| ref = "Best18" | ||
| t = db.query(db.ProperMotions).filter(db.ProperMotions.c.reference == ref).astropy() | ||
| assert len(t) == 1966, f"found {len(t)} proper motion entries for {ref}" |
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.
Move both Kirk19 and Best18 proper motion test to test_data_astrometry
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.
Work with Kasey to write a test of *adopted" proper motions for Best18, Best20, and GaiaEDR3
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.
Here's an example for parallaxes:
t = (
db.query(db.Parallaxes)
.filter(and_(db.Parallaxes.c.reference == ref, db.Parallaxes.c.adopted == 1))
.astropy()
)
assert (
len(t) == 1077
), f"found {len(t)} adopted parallax reference entries for {ref}"|
I think the |
|
Yep you're right! |
|
Does pytest pass locally? |
|
yep! It passed locally |
tests/test_data_astrometry.py
Outdated
| t = db.query(db.Parallaxes).filter(db.Parallaxes.c.reference == ref).astropy() | ||
| assert len(t) == 15, f"found {len(t)} parallax entries for {ref}" | ||
|
|
||
| def test_proper_motion_adopted(db): |
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.
Instead of running the same test multiple times, try using pytest.mark.paramatrize.
|
push the JSONs! |
|
and update the Versions table. I'm pretty sure new version is 3.3.2025.9. |
kelle
left a comment
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 this is great!
Short description: This pull request is to ingest photometry and proper motion data from Pan-STARRS catalog
Link to relevant issue: #609
For data ingests: