Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DET_OVERSAMP header keyword does not return detector oversampling #201

Open
mperrin opened this issue Aug 23, 2018 · 1 comment
Open

DET_OVERSAMP header keyword does not return detector oversampling #201

mperrin opened this issue Aug 23, 2018 · 1 comment

Comments

@mperrin
Copy link
Collaborator

mperrin commented Aug 23, 2018

Issue by douglase
Monday Jan 16, 2017 at 01:00 GMT
Originally opened as mperrin/poppy#201


When the MFT detector sampling is not equal to the wavefront oversampling the correct value is not passed to the output FITS file header.

Example code:

osys = poppy.OpticalSystem(oversample=18)
osys.add_pupil(poppy.CircularAperture())
osys.add_detector(0.1, fov_pixels=30,oversample=10)
psf=osys.calc_psf()
psf[0].header["OVERSAMP"], psf[0].header["DET_SAMP"]

returns:
(18,18)

rather than (18,10) as expected.

@mperrin
Copy link
Collaborator Author

mperrin commented Aug 23, 2018

Comment by mperrin
Tuesday Jan 17, 2017 at 15:06 GMT


Argh, good catch. I have to admit, the multiple types of oversampling available is sort of a confused and tricky area of the code, for various historical reasons.

The wavefront oversampling is set when instantiating a Wavefront object, and stored as an object attribute which persists throughout the calculation. The detector oversampling isn't; it's read from the Detector object inside Wavefront._propagate_mft. The cleanest fix here is probably to modify that function to record the detector oversampling as another attribute, and update Wavefront.as_fits correspondingly.

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

No branches or pull requests

1 participant