-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add tool for migrating stellarphot v1 data to stellarphot v2 #471
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #471 +/- ##
==========================================
+ Coverage 80.05% 80.32% +0.27%
==========================================
Files 31 32 +1
Lines 4011 4067 +56
==========================================
+ Hits 3211 3267 +56
Misses 800 800 ☔ View full report in Codecov by Sentry. |
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.
Looks good... At least the column renaming and so forth. I am curious about units (since no explicit unit conversion done). See my notes. Approve, but would appreciate feedback and typo corrections.
@@ -438,6 +438,9 @@ def __init__( | |||
**kwargs, | |||
) | |||
|
|||
# From this point forwarsd we should be using self to get at any data |
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.
# From this point forwarsd we should be using self to get at any data | |
# From this point forward we should be using self to get at any data |
Same typo noted in #470
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.
Was fixed there
stellarphot/conftest.py
Outdated
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.
A little confused why you created a fixture for this rather than just creating a new and old version of the testing file... it it just to allow iteration of test cases via the fixture?
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.
Looks like a through test suite as far as I can tell, kind of explains the weird fixture I noted earlier.
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.
Yeah, was using it a few different times
# Note that this deliberately discards any unit that might have been | ||
# present in the original data. This is a stellarphot-specific migration | ||
# tool, not something more general, and the choices above are the correct | ||
# units for the data. | ||
new_data[un] = new_data[un].value * unitify[un] |
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.
Could we potentially have unit conversion issues here? Or were these units also used in v1 but just not attached to the columns? I don't remember.
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.
The old almost never included units, but it depended on whether the photometry was saved as CSV (no units saved) or FITS (units sometimes present for some things). This is maybe a little risky, but for feder data the image unit was always ADU, times, in seconds, etc.
No one else ever used v1 as far as I know, so this should be ok, I think
The merge-base changed after approval.
Co-authored-by: Juan Cabanela <[email protected]>
Co-authored-by: Juan Cabanela <[email protected]>
This adds a way to update v1 data so that it can be used in v2. This will help remove the need to redo a bunch of photometry while allowing users to take advantage of the new stuff in v2.
NOTE: #470 should be merged first, because that fix was necessary for this PR to work.