Top and bottom timing parameters at event and peak level #1119
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does the code in this PR do / what does it improve?
This PR adds plugins computing timing parameters (center time, rise time, 50% and 50% ranges) at peak level as well as event level, depending on needs of an individual analyst.
Can you briefly describe how it works?
Technical remark, in order to compute parameter, it forms "fake peaks" based on
data_top
for top array or(data - data_top)
for bottom array. And then reuses the quantile calculation from strax to avoid unnecessary code duplication.To get parameters at peak level, one needs to run:
which will return fields
center_time_top
,center_time_bot
rise_time_top
,rise_time_bot
range_50p_area_top
,range_50p_area_bot
range_90p_area_top
,range_90p_area_bot
with definitions the same as in peak_basics.
To get it at event level one needs:
which will provide the similar fields, but for main/alt s1/s2 forming the event, e.g.
s1_rise_time_top
,alt_s2_center_time
etc.Can you give a minimal working example (or illustrate with a figure)?
Few plots from few Kr83m runs:
time difference between top and bottom center times as function of Z:
or rise time of bottom array
Please include the following if applicable: