Skip to content

Fixes off-by-a-half in FOVs; needs cleaning#880

Draft
oczoske wants to merge 2 commits intomainfrom
oc/psf_convolution
Draft

Fixes off-by-a-half in FOVs; needs cleaning#880
oczoske wants to merge 2 commits intomainfrom
oc/psf_convolution

Conversation

@oczoske
Copy link
Collaborator

@oczoske oczoske commented Feb 19, 2026

This PR

  • replaces scipy.signal.zoom with interpolation using RegularGridInterpolator and WCS in PSF rescaling
  • makes sure that the rescaled PSF kernel has even pixel numbers on either side. This is necessary for scipy.signal.convolve with mode='same' keeps the (convolved) source centred in the output.

The second point needs to be refined: Currently it works for FOVs with even pixel numbers, but the code should be prepared to handle odd pixel numbers as well.

Closes #879

@oczoske oczoske self-assigned this Feb 19, 2026
@oczoske oczoske added the bugfix PR resolving one or more bugs (use "Bug" type for issues, not this label) label Feb 19, 2026
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.70%. Comparing base (67be391) to head (09e235d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
scopesim/effects/psfs/discrete.py 82.35% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
- Coverage   74.83%   74.70%   -0.13%     
==========================================
  Files          69       69              
  Lines        8868     8886      +18     
==========================================
+ Hits         6636     6638       +2     
- Misses       2232     2248      +16     

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

@teutoburg teutoburg moved this to 🏗 In progress in ScopeSim-development Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR resolving one or more bugs (use "Bug" type for issues, not this label)

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

Point source convolution with symmetric PSF yields asymmetric image

1 participant