Skip to content

Fix/aoe cut kwargs api update#148

Open
jonasschlegel wants to merge 2 commits intomainfrom
fix/aoe-cut-kwargs-api-update
Open

Fix/aoe cut kwargs api update#148
jonasschlegel wants to merge 2 commits intomainfrom
fix/aoe-cut-kwargs-api-update

Conversation

@jonasschlegel
Copy link
Copy Markdown
Contributor

No description provided.

The kwargs psd_cal_pars_type/psd_cal_pars_cat were renamed to
aoe_cal_pars_type/aoe_cal_pars_cat and aoe_cut_pars_type/aoe_cut_pars_cat
in LegendEventAnalysis. Also include original error in LoadError message.
@jonasschlegel jonasschlegel requested a review from theHenks March 28, 2026 17:39
@jonasschlegel jonasschlegel self-assigned this Mar 28, 2026
@jonasschlegel jonasschlegel added the bug Something isn't working label Mar 28, 2026
Copilot AI review requested due to automatic review settings March 28, 2026 17:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates processor code to align with an updated AoE-cut calibration API and improves error reporting, with an additional change to raw filekey filtering during hit-cal processing.

Changes:

  • Update p_process_aoe_cut to call calibrate_ged_detector_data with new AoE/AoE-cut kwarg names.
  • Improve AoE-cut load failure logging by including the truncated exception text.
  • Change process_hit_cal raw input filekey filtering from load_key=:unprocessable to load_key=:all.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
processors/process_hit_cal.jl Adjusts filtering criteria for raw calibration filekeys used during hit-cal processing.
processors/p_process_aoe_cut.jl Updates AoE-cut calibration call kwargs and enhances error logging/exception messages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -3,7 +3,7 @@ function process_hit_cal(processing_config::PropDict, l200::LegendData, period::
@info "Generate cal hit for period $period and run $run"

Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This change switches raw input filtering from load_key=:unprocessable to load_key=:all, which can materially change which raw files are used (e.g., for pulser tag extraction). If this is intentional, please add a brief rationale (or split into a separate PR) so the AoE-cut API update PR doesn’t also introduce an untracked processing-behavior change here.

Suggested change
# NOTE: We intentionally use `load_key = :all` here so that both DSP and RAW file
# lists include every available file, not only those marked as processable.
# This is required to ensure pulser tag extraction sees the full set of RAW inputs
# and does not silently drop files based on more restrictive filters (e.g. :unprocessable).

Copilot uses AI. Check for mistakes.
catch e
@error "E data for $det from cannot be loaded"
throw(LoadError("E data", 154, "E data for $det from partition $(part) cannot be loaded"))
@error "E data for $det from cannot be loaded: $(truncate_error(e))"
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

The log message has a grammatical/unclear fragment ("E data for $det from cannot be loaded"). Consider removing the stray "from" and/or including the same context as the thrown error (e.g., partition/run) so the log line is actionable on its own.

Suggested change
@error "E data for $det from cannot be loaded: $(truncate_error(e))"
@error "E data for $det from partition $(part) cannot be loaded: $(truncate_error(e))"

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (5d90497) to head (ed2a020).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #148   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          5       5           
  Lines        518     518           
=====================================
  Misses       518     518           

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants