Skip to content

Change default apodization to C1#1688

Merged
ykyohei merged 3 commits into
masterfrom
apo_type
Jul 3, 2026
Merged

Change default apodization to C1#1688
ykyohei merged 3 commits into
masterfrom
apo_type

Conversation

@ykyohei

@ykyohei ykyohei commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The docstring says we apodize by cosine taper but I have realized that it has not been standard one.
I'm not sure if it's okay to change the default, but this PR changes the default to standard cosine taper (hann window).

if apo_type == 'C1':
    cosedge = 0.5 * (np.cos(np.linspace(0, np.pi, apodize_samps)) + 1)
elif apo_type == 'old_default':
    cosedge = np.cos(np.linspace(0, np.pi/2, apodize_samps))

The calculation of weight_for_signal for hwpss and azss were redundant as get_apodize_window_from_flags.
They are simplified.

apodize_C1

@ykyohei ykyohei marked this pull request as ready for review July 2, 2026 20:06
@ykyohei ykyohei requested a review from msilvafe July 3, 2026 15:51

@msilvafe msilvafe left a comment

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.

Thanks for correcting and simplifying. I didn't realize we were doing something non-standard!

Just one inline comment about docstrings.

Comment thread sotodlib/tod_ops/apodize.py Outdated
@ykyohei ykyohei merged commit dfef300 into master Jul 3, 2026
8 of 9 checks passed
@ykyohei ykyohei deleted the apo_type branch July 3, 2026 19:45
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