-
Notifications
You must be signed in to change notification settings - Fork 269
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 option to load pointing information with TableLoader, fixes #1900 #1901
Conversation
- create method to join interpolated pointings to table
Codecov Report
@@ Coverage Diff @@
## master #1901 +/- ##
==========================================
+ Coverage 92.05% 92.06% +0.01%
==========================================
Files 189 189
Lines 14862 14882 +20
==========================================
+ Hits 13681 13701 +20
Misses 1181 1181
Continue to review full report at Codecov.
|
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'd recommend not putting the interpolation logic in TableLoader, since it has to be used in other places as well and if we do it differently in two places, it will cause a headache in the future. Better to have a PointingInterpolator component (or even just a function) in the calib
module. It should just take an astropy Table
as input.
Also, in that you should use scipy.interpolate.interp1d
instead of np.interp
, since it is more flexible and can pre-compute the interpolation nodes so it is more efficient if one calls it more than once (as we would in the event loop, but maybe not in TableLoader)
see #1902 |
Hi, unfortunately I think it is not as simple as this and I think we have to distinguish the simulation vs. the observed data case here because: The times in simulations are the timestamp the simulation was performed and not a meaningful timestamps. This has two consequences:
I think we should stop storing pointing information like we do it now for simulations and instead use a specialised field / table in |
Closing this for the reasons mentioned above |
Description:
I've added an option for the
TableLoader
to load pointing information from the subarray table, interpolate and adding them to the table.Side-Notes:
/subarray/pointing
table instead of the/telescope/pointing
as its done for the trigger information. It doesnt make any difference for simulation data or just one telescope for now (but its faster this way), but has to be adapted in future (Therefore the TODO note).load_trigger=True
, because the astropy_helper functionjoin_allow_empty
just copies the unsorted table if one side is empty. The astropyjoin
function sorts by keys). But i think it wouldn't be a problem to justgroup_by(keys)
them, if someone needs a sorted one.Refers to #1900