Allow shifting a detector, in alternative to shifting a source #643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finish implementing the long-delayed option to shift a detector, rather than shifting the point source. This is implemented as an option for offsetting a detector relative to the nominal center of a beam. The underlying math for this has been implemented for years in the
matrixDFT.py
functions; this PR adds the small amount of code to the Detector class to pass through parameters to the matrix DFT functions.Conceptually, shifting a source (+dX, +dY) should be equivalent to shifting the detector (-dX, -dY). There's a unit test implemented that verifies that is the case. (In fact, that unit test is >50% of the code in this PR)
This option may be used in certain future features that may be added to webbpsf/stpsf particularly in the context of coronagraph simulations. (We can already shift the source, and shift the coronagraph mask; this added the option to shift the detector also).
To Do: