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

External raw records #292

Merged
merged 14 commits into from
Dec 12, 2023
Merged

External raw records #292

merged 14 commits into from
Dec 12, 2023

Conversation

cfuselli
Copy link
Member

@cfuselli cfuselli commented Dec 12, 2023

I modified the raw_records (DAQReader) plugin to allow for creating raw_records_ext, a new type of data that is intended to be used for measuring signals out of the TPC. For example, we can use it as a "software external trigger": measure some signals with an external TPC and select on events that come in coincidence with some peak in the external PMT.

For this reason, we want to have a complete separate chain of raw_records-peaks that follow a separate processing wrt the TPC PMTs. This is implemented in a very similar way as the neutron and muon veto detectors are treated in XENONnT.

We define the PMT channels in the context channel map:

channel_map={
            'bottom': (0, 0), 
            'top': (1,4), 
            'external': (5,10)
 }

'top' and 'bottom' are required, while 'external' defaults to (-1,-1).

We now have:

  • raw_records_ext
  • records_ext
  • peaks_ext
  • peak_basics_ext

These copies of the original plugins do all similar things but just with raw_records coming from external channels (in this case channel 5). Some fine tuning might be needed on the specific requirements for the processing of these peaks. The processing of normal records and peaks should be unchanged.

NOTE: it is important to preserve always the same lineage_hash for raw_records. This is possible by having the raw_records as the last type produced in the DAQReader plugin, because the lineage comes from the last plugin.

Here an example notebook used to test this new framework, assuming that channel 4 would be an external PMT.

new_raw_records.pdf

@coveralls
Copy link

coveralls commented Dec 12, 2023

Pull Request Test Coverage Report for Build 7182529346

  • 209 of 251 (83.27%) changed or added relevant lines in 7 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+3.0%) to 42.18%

Changes Missing Coverage Covered Lines Changed/Added Lines %
amstrax/plugins/peaks_ext/peaks_ext.py 27 28 96.43%
amstrax/plugins/raw_records/daqreader.py 88 99 88.89%
amstrax/plugins/peaks_ext/peak_basics_ext.py 57 87 65.52%
Files with Coverage Reduction New Missed Lines %
amstrax/plugins/raw_records/daqreader.py 5 84.52%
Totals Coverage Status
Change from base Build 7169683893: 3.0%
Covered Lines: 1184
Relevant Lines: 2807

💛 - Coveralls

@cfuselli cfuselli merged commit d91cdcb into master Dec 12, 2023
12 checks passed
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.

2 participants