Skip to content

Add bandpass specific preproc noise select - #1729

Merged
mmccrackan merged 5 commits into
masterfrom
260901_noise_select
Sep 1, 2026
Merged

Add bandpass specific preproc noise select#1729
mmccrackan merged 5 commits into
masterfrom
260901_noise_select

Conversation

@mmccrackan

Copy link
Copy Markdown
Contributor

Adds the ability to pass in a dictionary for the noise process stage select function parameters min_noise, max_noise, and max_fknee. This is to avoid the LAT preprocessing from needing different configs, since noise is currently the only process that needs different values. Maintains backwards compatibility and will throw TypeError if not a float, int, or dict.

@mmccrackan
mmccrackan requested a review from msilvafe September 1, 2026 17:54
Comment thread sotodlib/preprocess/processes.py Outdated
Comment thread sotodlib/preprocess/processes.py Outdated
Comment on lines +909 to +910
mask = (meta.det_cal.bandpass == k)
keep[mask] &= (wn[mask] <= v)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why use det_cal instead of det_info here? Also this requires a context with some non-zero metadata so I think we need to check for this and raise some suitably clear error. Maybe like if det_info in meta then use det_info bandpass, else if det_cal in meta then use det_cal, else raise a value error that neither det_cal nor det_info exist in meta

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah was handling bandpass in an incomplete manner. It will now try to get det_info.wafer.bandpass first and det_cal.bandpass second. If it doesn't find either it just sets it to None since we may not need it. Trying to run the bandpass selects will then error out cleanly if it is None.

@mmccrackan
mmccrackan requested a review from msilvafe September 1, 2026 20:01
@mmccrackan
mmccrackan merged commit 7044d57 into master Sep 1, 2026
5 checks passed
@mmccrackan
mmccrackan deleted the 260901_noise_select branch September 1, 2026 20:19
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