One of the key missing bits of functionality in the propagator is to allow arbitrary tilts to be specified. The driving use-case for this at the moment is simulating pointing error that causes the PSF to wander around the focal plane from frame to frame when the line of sight stability isn't great.
I think a lot of the base functionality is there, but there are a couple of gotchas:
Right now the input wavefront inherits its shape from the first plane in planes. This will break because Tilt's shape is None. I think the right way to deal with this is to perform a pre-propagation step in Propagate's __enter__() method that determines the correct shape from the list of planes. It already has to iterate through all the planes to set up caching anyways, so this is the natural place to set the shape too.
Eventually we'll have to think about what to do with all the accumulated tilt if the last propagation isn't from a Pupil to a Detector. We'll get an early look at how this may play out when we try Tilt -> Pupil -> Grism -> Detector propagations,
The intended usage is something along the lines of:
planes = [Tilt(x=1e-6, y=-3e-6), pupil, detector]
The interface should allow for specifying both a static offset or providing a function which returns a shift every time it is called. This may result in the development of a RandomTilt object.
One of the key missing bits of functionality in the propagator is to allow arbitrary tilts to be specified. The driving use-case for this at the moment is simulating pointing error that causes the PSF to wander around the focal plane from frame to frame when the line of sight stability isn't great.
I think a lot of the base functionality is there, but there are a couple of gotchas:
Right now the input wavefront inherits its shape from the first plane in
planes
. This will break becauseTilt
's shape is None. I think the right way to deal with this is to perform a pre-propagation step inPropagate
's__enter__()
method that determines the correct shape from the list of planes. It already has to iterate through all the planes to set up caching anyways, so this is the natural place to set the shape too.Eventually we'll have to think about what to do with all the accumulated tilt if the last propagation isn't from a Pupil to a Detector. We'll get an early look at how this may play out when we try Tilt -> Pupil -> Grism -> Detector propagations,
The intended usage is something along the lines of:
The interface should allow for specifying both a static offset or providing a function which returns a shift every time it is called. This may result in the development of a
RandomTilt
object.