Add julia script for ideal Pulse Shape Library generation#57
Add julia script for ideal Pulse Shape Library generation#57gipert merged 1 commit intolegend-exp:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #57 +/- ##
==========================================
+ Coverage 67.13% 67.96% +0.82%
==========================================
Files 23 23
Lines 2054 2060 +6
==========================================
+ Hits 1379 1400 +21
+ Misses 675 660 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Can you run pre-commit locally, this will include checks on the julia code and formatting |
There was a problem hiding this comment.
Pull request overview
This pull request adds two new scripts for HPGe pulse shape modeling to create a Pulse Shape Library (PSL). The scripts work together to generate realistic waveform maps from ideal simulated waveforms.
Changes:
- Added
make_hpge_ideal_wf_map.jlto generate ideal waveform maps from SolidStateDetectors simulations - Added
make_hpge_realistic_wf_map.pyto transform ideal waveform maps into realistic ones through convolution with electronics response
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 29 comments.
| File | Description |
|---|---|
| workflow/src/legendsimflow/scripts/make_hpge_ideal_wf_map.jl | Julia script that simulates ideal charge waveforms for HPGe detectors at different crystal axis angles using SolidStateDetectors, normalizes them, and saves to LH5 format |
| workflow/src/legendsimflow/scripts/make_hpge_realistic_wf_map.py | Python script that processes ideal waveform maps by convolving with system response kernels, converting to current waveforms, applying moving window averaging, and aligning peaks to create realistic PSL compatible with reboost |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8165dc2 to
290731e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 19 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
see #91 |
|
@gipert I saw it, but I am not using those functions in my script, even though its true that there is a lot of shared code.
|
|
Yes, the first is the right solution |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@SalehGiovanna I rebased this onto #95. I think its in a great shape, I can quickly make the last fixes then we are done with this (we can add tests in a further PR) |
tdixon97
left a comment
There was a problem hiding this comment.
Just some small comments to remove the outdated options, this would also align with the dt map script
|
after #95 got merge the situation got messy, i work on a rebase now |
e1d302a to
3e4c560
Compare
|
@gipert now the commits are just by you and Claude, do you know how to fix this to be Giovanna? |
|
@tdixon97 yes i'm doing it now, I did not commit anything yet because I saw there was ongoing work, now i do it |
670be1f to
a118787
Compare
|
I fixed the authors. I just have a chat with @SalehGiovanna, she is gonna pick the work up from the current status here. |
|
Now the authors is me and you Luigi? Should be Giovanna |
|
The first commit is giovanna's work and she's an author there |
hervasa2
left a comment
There was a problem hiding this comment.
Very nice! Please see minor requested changes and comments from the SSD side
|
I would move to merge this asap and then to switch to the new ssd on everything on a subsequent PR |
|
We first need to remove the duplicate code and add (atleast basic) tests. For example even a test the code runs is valuable |
|
important missing thing: extend the PSL outside its bounds as done at the end of the function that makes the dt map |
|
But then how do we handle those waveforms? |
|
I added a few (basic) tests, that the ssd code runs |
You don's simulate those waveforms. You just copy the waveform from the nearest pixel inside the detector, just like the dt map (but with a waveform instead of the dt) |
|
But isn't it better to have waveforms outside the detector volume being jus NaNs, so they are easy to identify later? |
no, the pixelation will always leave some holes in valid areas of the detector, so we want to extend the domain to be safe |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-Authored-By: Giovanna Saleh <giovanna.saleh@phd.unipd.it> Co-Authored-By: Toby Dixon <toby.dixon.23@ucl.ac.uk>
162fc9e to
88133c7
Compare
Julia script to build ideal Pulse Shape Library using ssd
Realistic PSL construction from ideal (py) ---> Moved to separate PR