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_ref_mon_nv_plugin #1307
add_ref_mon_nv_plugin #1307
Conversation
for more information, see https://pre-commit.ci
…nto add_ref_mon_nv
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.
Looks fine I will make a small test process before approving and merging.
time_unique_split = np.split(time_unique, np.where(time_diff >= split_time)[0]) | ||
trigger_times = np.array([i[0] for i in time_unique_split]) | ||
|
||
# split the hits in trigger windows |
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.
FYI: For splitting things by some container you can also use strax.split_by_containment
or strax.fully_contained_in
. Could be that those functions are faster if performance is an issue.
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.
It should be not a problem, but for future upgrades I could also test strax functions to see improvements. Thanks a lot!
I fixed a small import error, and test processed run |
and removed some not needed imports |
What does the code in this PR do / what does it improve?
The code in this PR introduce a new plugin which computes parameters used for the Reflectivity Monitor for the Neutron Veto
Can you briefly describe how it works?
From the raw records, the start time of each trigger window is extracted (by taking the smallest "time" of all the channels)
Using the hitlets, the delta times wrt the beginning of the trigger are computed.
Cuts can be made in area (of all the hitlets), time (since the beginning of the trigger window) and number of contributing PMTs (in each window).
The returned values are the delta times (used for the reflectivity), PMT channels and areas.