fixed_sampling_optic¶
-
poppy.
fixed_sampling_optic
(optic, wavefront, oversample=2)[source]¶ Convert a variable-sampling AnalyticOpticalElement to a fixed-sampling ArrayOpticalElement
For a given input optic this produces an equivalent output optic stored in simple arrays rather than created each time via function calls.
If you know a priori the desired sampling will remain constant for some application, and don’t need any of the other functionality of the AnalyticOpticalElement machinery with get_opd and get_transmission functions, you can save time by setting the sampling to a fixed value and saving arrays computed on that sampling.
Also, you can use this to evaluate any optic on a finer sampling scale and then bin the results to the desired scale, using the so-called gray-pixel approximation. (i.e. the value for each output pixel is computed as the average of N*N finer pixels in an intermediate array.)
- optic : poppy.AnalyticOpticalElement
- Some optical element
- wave : poppy.Wavefront
- A wavefront to define the desired sampling pixel size and number.
- oversample : int
- Subpixel sampling factor for “gray pixel” approximation: the optic will be evaluated on a finer pixel scale and then binned down to the desired sampling.
- new_array_optic : poppy.ArrayOpticalElement
- A version ofthe input optic with fixed arrays for OPD and transmission.