Skip to content

new use case and enforcing odd parity of PSFs#5

Open
rchwn wants to merge 4 commits intofrancbelf:masterfrom
rchwn:master
Open

new use case and enforcing odd parity of PSFs#5
rchwn wants to merge 4 commits intofrancbelf:masterfrom
rchwn:master

Conversation

@rchwn
Copy link
Copy Markdown

@rchwn rchwn commented Mar 5, 2026

See Issue #4

I made a minor change to make_psf.py, where the resample factor is now set to 5 (from 4) and parity is forced to be odd. This ensures the PSF generated by stpsf has the peak centered on a single pixel.

The other change is the addition of a new function process_source_psf() in kernel_core.py so that one can instantiate the parent class without needing to refer to a target PSF, and save the processed source PSF (same Aniano processing from the original version of kernel_core.py). Just copied it to a new function. The other tweaks are to make the init logic work as planned.

I put some test scripts along with the version of kernel_core.py in the notebooks/ folder.

@francbelf @akleroy @thomaswilliamsastro

rchwn and others added 4 commits March 4, 2026 16:58
…ding

- kernel_core: force odd dimensions when skipping resample (match resample behavior)
- kernel_core: add filename_suffix parameter to save_processed_psf()
- make_psf: fix detector_oversample parameter extraction (was popping oversample_factor twice)
- make_psf: add warnings when detector_oversample is even
- make_psf: forward kwargs in read_PSF() for auto-generation support

Made-with: Cursor
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.

1 participant