Found during a full-repo audit.
generate/imaging.py:587 (_load_PSF_from_file) calls load_psf(path, transpose, unitary), but:
- the only import is commented out at
generate/imaging.py:9 (# from .psf.image_psf import load_psf), and
- there is no
def load_psf anywhere in the package (grep -rn "def load_psf" src/ returns nothing), and it is not provided by the from ..utils.transform.datatype import * wildcard.
So any modality whose PSF stack_source != "generate" hits _load_PSF_from_file → NameError: name 'load_psf' is not defined.
Latent today because every shipped modality config uses source: generate, but a user-supplied PSF-from-file config crashes.
I did not fix this in the audit PRs because the fix needs the original psf/image_psf.py (or equivalent) load_psf implementation, which isn't in the tree — guessing it would be wrong. Options:
- restore/repoint the import to the real
load_psf, or
- implement
load_psf, or
- raise a clear
NotImplementedError if PSF-from-file isn't supported yet.
Found during a full-repo audit.
generate/imaging.py:587(_load_PSF_from_file) callsload_psf(path, transpose, unitary), but:generate/imaging.py:9(# from .psf.image_psf import load_psf), anddef load_psfanywhere in the package (grep -rn "def load_psf" src/returns nothing), and it is not provided by thefrom ..utils.transform.datatype import *wildcard.So any modality whose PSF
stack_source != "generate"hits_load_PSF_from_file→NameError: name 'load_psf' is not defined.Latent today because every shipped modality config uses
source: generate, but a user-supplied PSF-from-file config crashes.I did not fix this in the audit PRs because the fix needs the original
psf/image_psf.py(or equivalent)load_psfimplementation, which isn't in the tree — guessing it would be wrong. Options:load_psf, orload_psf, orNotImplementedErrorif PSF-from-file isn't supported yet.