-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor hour angle calculation #30
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 77 77
=========================================
Hits 77 77 ☔ View full report in Codecov by Sentry. |
How did you test the calculations to guarantee that the refactoring still works? Could we use some of these tests as tests in the workflow? |
We should definitely think of tests for this in the future |
Is this computing local hour angle for a source? If yes, It think the correct solution would be to use astropy coordinate transformation into the correspondig frame, not by hand computations using time. I think the correct frame is: https://docs.astropy.org/en/stable/api/astropy.coordinates.HADec.html#astropy.coordinates.HADec |
Yes, relative to Greenwich.
I was actually looking for something like this. Will give it a try, thank you. |
what is the state of this idea? is it easy to try or should we focus on different stuff for now? |
For some reason my current implementation of the GHA implementation off by one hour to the implementation on the main branch. We should look into why that is. |
This replaces the loops in the hour angle calculation
in observation.py and data_set.py with array operations
resulting in a (small) performance boost of the code.