Skip to content
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

Merged
merged 27 commits into from
Feb 1, 2025
Merged

Reboost core API #26

merged 27 commits into from
Feb 1, 2025

Conversation

tdixon97
Copy link
Collaborator

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

@tdixon97
Copy link
Collaborator Author

CI will be fixed once legend-exp/legend-pydataobj#132 is merged.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 96.31902% with 12 lines in your changes missing coverage. Please review.

Project coverage is 66.76%. Comparing base (1729480) to head (71bb7ab).
Report is 45 commits behind head on main.

Files with missing lines Patch % Lines
src/reboost/utils.py 91.48% 4 Missing ⚠️
src/reboost/core.py 95.58% 3 Missing ⚠️
src/reboost/hpge/surface.py 93.93% 2 Missing ⚠️
src/reboost/build_hit.py 96.87% 1 Missing ⚠️
src/reboost/profile.py 97.14% 1 Missing ⚠️
src/reboost/shape/group.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #26       +/-   ##
===========================================
+ Coverage   54.87%   66.76%   +11.88%     
===========================================
  Files          16       21        +5     
  Lines        1139     1390      +251     
===========================================
+ Hits          625      928      +303     
+ Misses        514      462       -52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ManuelHu
Copy link
Collaborator

Copy link
Collaborator

@ManuelHu ManuelHu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some more minor issues from code review, mostly cosmetic.

@ManuelHu
Copy link
Collaborator

ManuelHu commented Jan 30, 2025

for the optics, focusing on build_hit right now. I think it is fine for now

the example config would not work yet, thugh? There we had the insertion of output tables into inputs. This is apparently not possible with your code right now.

Apart from that, I cannot really remember the reasoning for that split in the first place.... (maybe this was never intended to be run sequentially, but were two options "working on energy depositions alone" and "getting pe numbers for each channel" and that interdependence slipped in....?)

we just would have to figure out how to do this - this would maybe require on-demand building of a GLM for the output tables, if they are used as an input in a later step. But we still could figure that out later?

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Jan 30, 2025

the example config would not work yet, thugh? There we had the insertion of output tables into inputs. This is apparently not possible with your code right now.

What do you mean by this? What I wrote gives a mapping of input --> output detectors. So you can build all sipms tables starting from the scintillator input_table (and only reading it once). Just a matter of the right config and proccesors

Apart from that, I cannot really remember the reasoning for that split in the first place.... (maybe this was never intended to be run sequentially, but were two options "working on energy depositions alone" and "getting pe numbers for each channel" and that interdependence slipped in....?)

I didn't depend any dependence, I intended them to be totally independent. Maybe my filler name for the "scintillator" input was confusing?

@ManuelHu
Copy link
Collaborator

ManuelHu commented Jan 30, 2025

see this excerpt from the example config. I do not really remember if this dependency there was intentional in the end. (I remeber that we discussed such thing in December, but I do not remember the outcome)

But anyway, this does not make sense in the config. I guess it was a mistake from writing the example config file back then.

                - name: lar
                  detector_mapping:
                   - output: scintillators
[...]

                - name: spms

                  detector_mapping:
                   - output: [...]
                     input: scintillators

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Jan 30, 2025 via email

Copy link
Member

@gipert gipert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have major comments, so this can be merged from my side. It's also a lot of code and I'll need more time to read it.

About performance: there are surely many functions that can be sped up with Numba, but we need to have a detailed profiling first to identify the bottlenecks.

@gipert
Copy link
Member

gipert commented Jan 31, 2025

Also please rebase on main now that #28 is merged.

@ManuelHu
Copy link
Collaborator

ManuelHu commented Feb 1, 2025

hmm, now you did something very weird to your git history. This branch is now not rebased on main at all, and is completely unmergeable, as it has conflicts in a large number of files...

I am really not sure how you managed to do this, but I suppose you will have to fix it so it can be merged...

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 1, 2025 via email

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 1, 2025

Ok now we are back to how it was before, I will try again to rebase

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 1, 2025

I think its fine now @gipert / @ManuelHu ?

@ManuelHu
Copy link
Collaborator

ManuelHu commented Feb 1, 2025

Looks good. From my side itwould be okay to merge, but please still disuss Luigi's commets with him.

@tdixon97
Copy link
Collaborator Author

tdixon97 commented Feb 1, 2025

@gipert I added a ProfileDict with the functionality you wanted. Of course it can always be expanded later

@gipert gipert merged commit a305863 into legend-exp:main Feb 1, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants