Closed jmeyers314 closed 4 years ago
Actually, now that I think about it, this one can probably also be done as a surface op. Just need to "rewind" the photons backwards in time a bit before passing them on to the current SiliconSensor
.
And if it is a surface op, you don't need to decide which definition it is. The user can control that by whether they put this operator before or after the refraction. Which is actually pretty intuitive I think.
Actually, now that I think about it, this one can probably also be done as a surface op. Just need to "rewind" the photons backwards in time a bit before passing them on to the current
SiliconSensor
.
Hi Josh, I can't quite follow what you mean with the 'rewinding' language here.
The photons are coming in at an angle, which we parameterize by dx/dz and dy/dz slopes. Changing the point of convergence is equivalent to moving their x,y back by:
dx = -focus_depth * dxdz
and dy = -focus_depth * dydz
.
Then you can just use the current conversion distance routine in the Silicon code, and some of them will convert above the focus point and others below the focus point.
Ah, I see. You will want to call the refraction Surface Op before this then right?
So, even with batiod will we need to pre store/calculate the focus set point per-filter to do this? It seems like we should be able to calculate/record where the focus point was in the batoid step and then pass that to this operation. And, if you actually included the sensor in the optics path, you wouldn't need to do the extra refraction either.
You will want to call the refraction Surface Op before this then right?
It depends on how you want to define the focal_depth parameter:
This was done in #1072
In the redder bands of LSST, and presumably other cameras too, the best focus occurs when the geometric focus of the optics is located in the bulk of the silicon rather than at the surface.
I think simulating this can be achieved via a
focus_depth
kwarg toSiliconSensor
and some small changes around https://github.com/GalSim-developers/GalSim/blob/releases/2.2/src/Silicon.cpp#L602. I guess we'd need to decide if the keyword should refer to the depth within the silicon (so post-refraction distance), or how far the CCD surface needs to be displaced from the optical focus (pre-refraction distance).