-
Notifications
You must be signed in to change notification settings - Fork 2
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
Reboost core API #26
base: main
Are you sure you want to change the base?
Reboost core API #26
Conversation
…dd an example proccesor (activness)
CI will be fixed once legend-exp/legend-pydataobj#132 is merged. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
===========================================
+ Coverage 54.87% 66.18% +11.30%
===========================================
Files 16 20 +4
Lines 1139 1375 +236
===========================================
+ Hits 625 910 +285
+ Misses 514 465 -49 ☔ View full report in Codecov by Sentry. |
we will also need this in the reboost CI workflow: https://github.com/legend-exp/legend-pygeom-hpges/blob/bd48f219d964dd6dd31697b00b8a97297ded6e5b/.github/workflows/main.yml#L34-L37 |
Co-authored-by: Manuel Huber <[email protected]>
if isinstance(mu, Array): | ||
mu = mu.view_as("ak") | ||
elif isinstance(mu, ak.Array): | ||
mu = mu.to_numpy() | ||
elif not isinstance(mu, np.ndarray): | ||
mu = np.array(mu) | ||
|
||
# similar for sigma | ||
if isinstance(sigma, Array): | ||
sigma = sigma.view_as("ak") | ||
elif isinstance(sigma, ak.Array): | ||
sigma = sigma.to_numpy() | ||
elif not isinstance(sigma, (float, int, np.ndarray)): | ||
sigma = np.array(sigma) |
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.
hmm, this does not look right from the types. should'nt it be .view_as("np")
to always get an numpy array....?
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.
you are right, thanks
Implemented most of the core functions (orchestration) and added tests. @gipert , @ManuelHu
Still missing is extracting the detector mapping from config (for cases its not trivial) and also more full scale tests with
build_hit