StereoDispCombiner: Add Transformation to Nominalframe so divergent pointing is supported - #3076
Conversation
ebb6ace to
2ce1c49
Compare
d8cb973 to
9a1cc58
Compare
|
@maxnoe two things:
|
no
This is not new, any workflow of a first time outside contributor has to be approved first. |
|
@maxnoe And just to be sure: We can merge this into the stereo_combiner branch at our own discretion once the tests pass, correct? |
|
Sure, that's your PR branch |
|
A couple of comments to @maxnoe comment: After some generalization i merged the calculation of the minium distances to one function used by the table-wise and event-wise processing ( The only function, which currently cannot handle astropy units is /edit see #3076 (comment) |
|
It's fine to strip units for performance, but then one needs to be careful when and how they are added back. E.g. this is bad: because it makes unnecessary copies of potentially large arrays. These can be avoided by not using the naive |
|
|
|
I think it would be also nice to have a unit test for an event with at least two participating telescopes with different pointings. |
If we just change the telescope pointings in the dummy table to not be identical for all telescope events, this should be covered, no? |
|
I just checked the performances for single array events in the event-loop and it looks like its much faster calculating the fov_lon/lats and the minimum distances without units (also adding the strip and wrap back of the units...): import numpy as np
import astropy.units as u
signs = np.array([-1, 1])
hillas_fov_lon = 0.5 * u.deg
disp = 0.8 * u.deg
hillas_psi = 40 * u.deg
%timeit hillas_fov_lon + signs * disp * np.cos(hillas_psi)
%timeit (u.Quantity(hillas_fov_lon.to_value(u.deg) + signs * disp.to_value(u.deg) * np.cos(hillas_psi.to_value(u.rad)), u.deg, copy=False,))Im sorry, didn't expect to be that much of a difference. I would just leave it as it is. |
If you write a new unit test, adapting the dummy table just inside the test, i think yes. Otherwise i guess you also have to adapt all the expected reconstructed parameter aswell in the other tests |



This introduces support for divergent pointing for the StereoDispCombiner. Since the StereoDispCombiner PR is not finished yet this PR targets the corresponding branch instead of main.