GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
228 stars 107 forks source link

Model field-dependent optics PSF aberrations #716

Closed mdschneider closed 1 year ago

mdschneider commented 8 years ago

The optics module allows specification of an aberrated optics PSF by means of Zernike coefficients of the wavefront. But, the wavefront method is specific to a single field location. To model multiple PSFs at different locations in a field, the user is required to pre-calculate the variations of the wavefront Zernike coefficients over the field locations. This issue is to make such a calculation part of GalSim.

The phase_psf introduced in #549 provides a natural interface for such functionality. What is missing is the calculation of the Zernike coefficients for a given set of optics perturbations (e.g., tilts and decenters of optics elements and/or mirror figure errors).

Aberrated optics PSFs correlated over a field of view will be useful in survey-specific simulations (such as the WFIRST module or #556) and in simulations of PSF angular correlation functions as used in weak lensing null tests.

rmjarvis commented 8 years ago

This would be an excellent addition Michael. We would definitely like this for some of the LSST SRM tasks I think. To be clear, do you have the math for this already worked out? Or is there a research problem in figuring out what that variation in the aberrations vector looks like?

mdschneider commented 8 years ago

This is actually largely implemented as a set of GalSim wrapper scripts in our (non-public) LSST DESC github repository (psf_model/optics_model). I met with @jmeyers314 to get some advice about how this might fit into GalSim and starting to port over the existing scripts into the end of phase_psf.py in the #549 branch.

mdschneider commented 8 years ago

Here's a link to the script I'm trying to port over for those with DESC github access.

rmjarvis commented 8 years ago

Great. The TelescopePSFLSST should probably go in the lsst module (the galsim/lsst/ directory). And you won't be surprised to hear me say that we'll want more unit tests than you have there yet. :)

rmandelb commented 8 years ago

Just a quick logistical question: are you doing this on #549 or a new #716 branch that branches off from that? if you do it on #549 then the open PR for that branch will include this new code, which might not be what we want -- I would think we should review his code and then, once it's merged, review yours. @rmjarvis what do you think?

Also I think this makes #444 defunct; do you agree? If so, will close.

mdschneider commented 8 years ago

Yes, I'll work in a new branch #716 off of #549. I can push a start on this later today.

I would agree that #444 is made defunct by this issue. Aaron Roodman is also a collaborator on the research effort leading to this code and will supply some configuration parameters from Zemax that are needed for specific LSST modeling. I'm hoping that his Zemax scripts will also be useful in computing similar configuration parameters for other telescopes (given a Zemax model).

jmeyers314 commented 7 years ago

Hacking on this at DESC2017. I've got a Hopkins-basis aberrations generator built. Here's an image showing how it generates a field-dependent PSF (highly defocused LSST donuts in this case):

hopkins donuts

Next step: implement the wavefront method of the HopkinsTelescope class so that it can be part of a PhaseScreenList. This would naturally allow generation of atmosphere + optics PSFs.

cwwalter commented 7 years ago

What does Hopkins based mean in this context?

jmeyers314 commented 7 years ago

Hopkins basis = double Zernike basis. So, for example, the way that the wavefront spherical aberration coefficient (Z11) varies over the field of view is itself described as a linear combination of Zernike polynomials, and similarly for every other wavefront aberration coefficient.

I believe we should be able to learn what the required Hopkins coefficients are for a given telescope from either Zemax or out-of-focus donut images.

rmjarvis commented 1 year ago

It's been over 5 years since anyone worked on this branch. I'll note that the DoubleZernike class was added in #1221, which I think goes a significant way towards what people would need for this application. Is there anything still relevant here, or should this issue be retired?

jmeyers314 commented 1 year ago

I think we've basically moved this functionality, for Rubin at least, into ImSim. I'm happy to close. We can always reopen.