Skip to content

Allow passing special value to indicate that masked summarizers should select any bin>=0#257

Open
joezuntz wants to merge 4 commits intomainfrom
jz_any_bin_masked_summarizers
Open

Allow passing special value to indicate that masked summarizers should select any bin>=0#257
joezuntz wants to merge 4 commits intomainfrom
jz_any_bin_masked_summarizers

Conversation

@joezuntz
Copy link
Copy Markdown
Contributor

Problem & Solution Description (including issue #)

This allows passing the string "all" as the selected_bin configuration option to the NaiveStackSummarizer and PointEstHistMaskedSummarizer classes. In that case any non-negative tomographic bin index objects will be selected, allowing us to run a non-tomographic analysis alongside a tomnographic one without duplicated data.

Code Quality

  • My code follows the code style of this project
  • I have written unit tests or justified all instances of #pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added
  • My code contains relevant comments and necessary documentation for future maintainers; the change is reflected in applicable demos/tutorials (with output cleared!) and added/updated docstrings use the NumPy docstring format
  • Any breaking changes, described above, are accompanied by backwards compatibility and deprecation warnings

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.85%. Comparing base (3e28b05) to head (c010bad).

Files with missing lines Patch % Lines
src/rail/estimation/algos/naive_stack.py 83.33% 1 Missing ⚠️
src/rail/estimation/algos/point_est_hist.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #257      +/-   ##
==========================================
- Coverage   93.89%   93.85%   -0.04%     
==========================================
  Files          67       67              
  Lines        4342     4348       +6     
==========================================
+ Hits         4077     4081       +4     
- Misses        265      267       +2     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Collaborator

@eacharles eacharles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to use "-1" to mean all to avoid mixing types?

@joezuntz joezuntz changed the title Allow passing "all" to indicate that masked summarizers should select any bin>=0 Allow passing special value to indicate that masked summarizers should select any bin>=0 Apr 29, 2026
@joezuntz
Copy link
Copy Markdown
Contributor Author

I have updated to define constants in common_params.py for doing no tomography (the existing -1 value) and using all non-negative bins (a new -2 value), and use these in the PR.

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.

3 participants