updated event_index and event_id description #1404
Open
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.
Description
The description of event_index can be confusing for new developers. I added a few lines of description in event_index and event_id to make it more clear.
Details:
Event_index is associated with pulses. Each pulse creates an entry in event_index, the values of event_index points to event_id and event_id contains information about detector_id.
Example:
event_index:
0:0
1:1
2:1
3:1
4:3
Event_id:
0:490
1:231
2:434
3:611
This means at pulse 0, current detector bank detected an event 0, the det_id for this event is event_id[0] = 490. For pulse 1, a new event is detected and indexed 1, the det_id for this event is event_id[1] = 231. For pulse 2 and pulse 3 no events are detected on this detector bank therefore the event_index for these 2 pulses remain 1. For pulse 4, 2 events are detected, the last index of the detected event is 3, meaning event 2 and 3 are created from this pulse and their det_ids are registered as 434 and 611.
This PR added a short paragraph in event_index to illustrate the description above. Also a little bit in event_id to make it easier to understand.