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

add_ref_mon_nv_plugin #1307

Merged
merged 9 commits into from Dec 20, 2023
Merged

add_ref_mon_nv_plugin #1307

merged 9 commits into from Dec 20, 2023

Conversation

eangelino
Copy link
Contributor

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.

@eangelino eangelino self-assigned this Dec 20, 2023
@coveralls
Copy link

coveralls commented Dec 20, 2023

Coverage Status

coverage: 91.591% (-0.2%) from 91.774%
when pulling 5c5614f on add_ref_mon_nv
into 25fadfe on master.

Copy link
Collaborator

@WenzDaniel WenzDaniel left a 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
Copy link
Collaborator

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.

Copy link
Contributor Author

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!

@WenzDaniel
Copy link
Collaborator

I fixed a small import error, and test processed run 057562 now it works like a charm.

@WenzDaniel
Copy link
Collaborator

and removed some not needed imports

@WenzDaniel WenzDaniel merged commit c7916fc into master Dec 20, 2023
9 checks passed
@WenzDaniel WenzDaniel deleted the add_ref_mon_nv branch December 20, 2023 18:12
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.

None yet

3 participants