Skip to content

Expose min_pixperbeam in loop_postprocess - #411

Merged
e-koch merged 1 commit into
masterfrom
expose-min-pixperbeam
Oct 14, 2026
Merged

e-koch merged 1 commit into
masterfrom
expose-min-pixperbeam

Conversation

@thomaswilliamsastro

@thomaswilliamsastro thomaswilliamsastro commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

The user may want more control over how many pixels per beam there are in the final image. This is probably more important for point-source science, and the fact that the ALMA pipeline aims for 5, while we aim for 3. Visually, there's a significant step up in visual fidelity going from 3 to 5 pixels per beam, but we currently have no control over that in postprocessing.

image

Summary

Exposes the min_pixperbeam parameter used when compressing cubes, so it can be set from the loop_postprocess call:

  • loop_postprocess gains min_pixperbeam: int = 3, passed to recipe_cleanup_one_target in the cleanup step.
  • recipe_cleanup_one_target and task_compress gain the same typed argument, replacing the hardcoded min_pixperbeam=3 passed to trim_cube for both the casa and spectralcube methods.
  • Each function documents the argument in Google docstring style.
  • Default is unchanged (3), so existing behaviour is preserved.
  • CHANGELOG entry added.

Testing

  • With CASA/analysisUtils stubbed and trim_cube mocked, loop_postprocess(do_cleanup=True, min_pixperbeam=5) passes 5 to trim_cube for both casa and spectralcube, and 3 when omitted. On master the same call raises unexpected keyword argument 'min_pixperbeam'.
  • ruff reports the same 4 pre-existing warnings as master.
  • The full CASA test suite was not run locally.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 7.95%. Comparing base (761667b) to head (abcc37a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #411   +/-   ##
======================================
  Coverage    7.95%   7.95%           
======================================
  Files          42      42           
  Lines       16635   16635           
  Branches     3983    3983           
======================================
  Hits         1324    1324           
  Misses      15288   15288           
  Partials       23      23           
Components Coverage Δ
casa 4.94% <ø> (ø)
handler 6.29% <ø> (ø)
spectral-cube 10.14% <ø> (ø)
utils 13.59% <ø> (ø)

Thread a typed min_pixperbeam argument (default 3, unchanged behaviour)
from loop_postprocess through recipe_cleanup_one_target into
task_compress, replacing the hardcoded value passed to trim_cube for
both the casa and spectralcube postprocessing methods.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@e-koch e-koch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@e-koch
e-koch merged commit 24dcf46 into master Oct 14, 2026
8 checks passed
@thomaswilliamsastro
thomaswilliamsastro deleted the expose-min-pixperbeam branch October 15, 2026 07: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