LouisDesdoigts / dLux

Differentiable optical models as parameterised neural networks in Jax using Zodiax
https://louisdesdoigts.github.io/dLux/
BSD 3-Clause "New" or "Revised" License
43 stars 6 forks source link

DynamicAperture Softening parameter is dependent on the pixel scale #224

Closed LouisDesdoigts closed 9 months ago

LouisDesdoigts commented 1 year ago

The softening parameter is meant to be agnostic to the physical scale of the aperture itself, but this is not the case.

Example:

import dLux as dl
import matplotlib.pyplot as plt

radius = 1e-6
aper = dl.CircularAperture(1e-6)
plt.imshow(aper.get_transmission(256, 2*radius))
Screenshot 2023-04-20 at 1 50 19 pm

We need to set softening to a very small value to get sensible results

aper = dl.CircularAperture(1e-6, softening=1e-5)
plt.imshow(aper.get_transmission(256, 2*radius))
Screenshot 2023-04-20 at 1 51 21 pm

This will be an issue for coronagraphs that have small angular pixel scales in the occulter plane.


LouisDesdoigts commented 1 year ago

@Jordan-Dennis would love your thoughts. I briefly tried to add a scale parameter to the _soften method taken from the coordinates but it seems the solution will be a little more involved than that.

LouisDesdoigts commented 9 months ago

Fixed with #246