Skip to content

TOFAnalogResponse: use thresholding to obtain a background-free response function#511

Open
daniloefl wants to merge 9 commits into
masterfrom
enhancement/improve_analog_from_counting
Open

TOFAnalogResponse: use thresholding to obtain a background-free response function#511
daniloefl wants to merge 9 commits into
masterfrom
enhancement/improve_analog_from_counting

Conversation

@daniloefl

Copy link
Copy Markdown
Contributor

TOFAnalogResponse aligns data from different conditions and averages them to extract the response function of a time-of-flight spectrometer. It can also simply count photo-electrons to obtain the detector response effect, ignoring the spectrometer impact. The latter mode is not very useful, as it disregards part of the response.

In this PR, the method of counting photo-electrons is used to threshold the data, while the analog data collected is still averaged out for the data passing the threshold. This allows this application to operate in very high-noise regimes.

@daniloefl daniloefl force-pushed the enhancement/improve_analog_from_counting branch from eb0514f to e70dd32 Compare July 1, 2026 19:37
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.89744% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.86%. Comparing base (c727444) to head (e44aac6).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/extra/applications/grating.py 81.96% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #511      +/-   ##
==========================================
+ Coverage   73.72%   73.86%   +0.14%     
==========================================
  Files          35       35              
  Lines        6927     6961      +34     
==========================================
+ Hits         5107     5142      +35     
+ Misses       1820     1819       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@daniloefl daniloefl changed the title Draft: TOFAnalogResponse: use thresholding to obtain a background-free response function TOFAnalogResponse: use thresholding to obtain a background-free response function Jul 2, 2026
* Apply grating mask
* Removed background subtraction: done in the Gotthard calibration.
* Updated tests.

---------

Co-authored-by: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de>
Co-authored-by: Thomas Michelat <32831491+tmichela@users.noreply.github.com>
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.

1 participant