Closed schneidermc closed 5 months ago
I think the simpler change is to have the grid in Field use the grid utility. Right now, the PhaseMask elements can use either jax.nn.initializers functions or our phase mask initialization functions. If we always ask for Fields, we lose that and it becomes a bit cumbersome to tweak the phase masks interactively.
Each function for each different kind of phase mask calculates its own grid. The grid should rather be passed to the function, e.g. from the Lightfield that is put in. That would remove duplicated code and make it easier to write a new function / phase mask.