Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain or generate NIRCam WFE maps for coronagraphic field points #180

Closed
mperrin opened this issue Aug 28, 2018 · 9 comments
Closed

Obtain or generate NIRCam WFE maps for coronagraphic field points #180

mperrin opened this issue Aug 28, 2018 · 9 comments
Milestone

Comments

@mperrin
Copy link
Collaborator

mperrin commented Aug 28, 2018

Issue by mperrin
Tuesday Dec 12, 2017 at 22:29 GMT
Originally opened as mperrin/webbpsf#180


Either find WFE maps from the IPR LEDs, or generate from Zemax.

This should hopefully include wavelength-dependent terms for the NIRCam-internal WFE (from the refractive optics being used at large field angle), and also for the wedge chromatic term. (see also spacetelescope/stpsf#14)

@mperrin mperrin added this to the 0.7.1 milestone Aug 28, 2018
@mperrin
Copy link
Collaborator Author

mperrin commented Aug 28, 2018

Comment by mperrin
Tuesday Dec 12, 2017 at 22:32 GMT


Should have tagged @JarronL in this issue too

@mperrin
Copy link
Collaborator Author

mperrin commented Aug 28, 2018

Comment by mperrin
Wednesday Apr 25, 2018 at 17:23 GMT


@JarronL I also wanted to ping you again on this one. It sounded like you could help provide us with info for the field dependent WFE terms and other factors for the coronagraph field points. Is that something you could provide in the near term? We're hoping to get a next release out timed for the June AAS meeting incorporating CV and OTIS results, etc, and could include this in that.

cc @shanosborne @obi-wan76

@mperrin
Copy link
Collaborator Author

mperrin commented Nov 26, 2018

Update - I'm also asking Randal if he can help provide such WFE maps for the coronagraphic field points.

@mperrin
Copy link
Collaborator Author

mperrin commented Nov 28, 2018

Update part 2: @JarronL has provided the answers!

Attached is a list of Zernike coefficients at each coronagraphic field point (only Mod A, though) for a number of wavelengths. I also have a couple tabs to compare the measured Zernike from CV3 (copied from si_zernikes_isim_cv3.fits) with the Zemax output at those same ISIM and MIMF field points. I've plotted a few of the Zernikes (Focus and Astigmatisms). Qualitatively, these all look pretty similar and appear to follow the same trends, point-to-point. The only exception is the SW focus, where there's a larger focus component in the observed, which we know of because the F212N filter has a power component that isn't accounted for in the Zemax model.

So, given that the Zemax and as-built measurements look fairly consistent, I'm comfortable using the Zemax-measured WFE values for the coronagraphics field points.

Zemax_WFE.xlsx

@mperrin
Copy link
Collaborator Author

mperrin commented Nov 28, 2018

This will take some careful thought for how to integrate into the WFE classes in WebbPSF. May want to be its own subclass? Compared to the regular NIRCam WFE, it adds a wavelength dependence to the Zernikes. And besides which, it breaks the idea of a 1:1 mapping between focal plane coords in pixels and the WFE lookup, since there's the prism wedges.

Sketch of a possible implementation, based on current code architecture:

  1. NIRCamFieldandWavelengthDependentAberration gets two major modes, one which does the existing regular stuff now, and one which is for the coronagraph modes. In init it would have to check if there is a coronagraph mode set, and if so set a bool attribute for which of those modes to operate in. The rest of init and the get_opd function would then become simple if/else wrappers that call one or the other of the actual sets of functions. Let's call these configure_imaging and configure_coronagraphic, and get_opd_imaging and get_opd_coronagraphic
  2. The "is this a coronagraphic mode?" check would have to be a bit subtle, looking at both the imaging mask and the pupil mask attributes, so as to do the right thing for edge cases like trying to get an off-axis PSF by setting the Lyot but not the image mask. Wait, actually it's probably sufficient to use the Lyots for the "is this a coronagraphic mode?" check, but then have to look at the image masks for the field point perhaps? Although the combo of a Lyot stop and a filter name should be pretty good in most cases (but cannot distinguish between the 335R and 430R cases).
  3. The coronagraph mode code wouldn't have a smooth interpolated field dependence, it would just directly use the Zernikes for whichever coronagraph field is appropriate. But then it would interpolate them to the desired wavelength.

@mperrin mperrin modified the milestones: 0.8.0, 0.8.1 Nov 28, 2018
@JarronL
Copy link
Collaborator

JarronL commented Mar 5, 2019

Just wanted to jump in real quick and say that those values from Zemax_WFE.xlsx are out of date based on our e-mail thread with Randall Telfer back in December. I just redid all these from scratch using the updated Zemax prescription and even added in all the ISIM and MIMF points, which might be useful for full frame coronagraphic observations. In the attached Excel file, I have a tab "si_zernikes_coron_wfe" which has the same outline as the si_zernikes_isim_wfe.fits file, with a grid of WFE points across the full coronagraphic focal plane for each channel (and some points outside the detectors' FoV). However, there is no optical model for Module B, so I simply used those values from the inverted V2 coordinate axes assuming the instrument WFE is symmetric.

An interesting thing to note is that the shape of the wavelength-dependent focus values tracks very closely to that in imaging mode, especially at shorter wavelengths. The solid lines show the defocus values for the field-averaged Zernike coefficients, and have been offset to match the 2.12um and 3.23um values of the ideal direct imaging focus curves.
defocus

Putting this all together, I think it would be sufficient to simply replace si_zernikes_isim_wfe.fits with an equivalent si_zernikes_coron_wfe.fits file if one of the Lyot stops is in the pupil wheel. Then you can still use the current nircam_defocus_vs_wavelength.fits to determine modifications to the focus Zernike coefficient. This way, we can use the infrastructure that is already in place with minimal code alterations. Thoughts?

coronagraph_WFE.xlsx

@mperrin
Copy link
Collaborator Author

mperrin commented Mar 7, 2019

Putting this all together, I think it would be sufficient to simply replace si_zernikes_isim_wfe.fits with an equivalent si_zernikes_coron_wfe.fits file if one of the Lyot stops is in the pupil wheel. [...] Thoughts?

Nice suggestion! I like it.

In terms of next steps, I'm actually taking a research leave right now (mini-sabbatical), so am not likely to make any additions to webbpsf in the near future. Perhaps Shannon or Marcio might be able to help with implementing this, though. Or do you think you might want to submit a PR for this yourself?

Separately those focus plots remind me, the focus model could use some updating. It seems pretty clear now the measured LW defocus at 3.2 microns is a property of the F323N filter, not something inherent in the optical system. We should consider updating the defocus model to switch that extra defocus on only for that filter name, and to use more like the LW ideal at that wavelength for other filters.

@JarronL
Copy link
Collaborator

JarronL commented Mar 7, 2019

Putting this all together, I think it would be sufficient to simply replace si_zernikes_isim_wfe.fits with an equivalent si_zernikes_coron_wfe.fits file if one of the Lyot stops is in the pupil wheel. [...] Thoughts?

Nice suggestion! I like it.

In terms of next steps, I'm actually taking a research leave right now (mini-sabbatical), so am not likely to make any additions to webbpsf in the near future. Perhaps Shannon or Marcio might be able to help with implementing this, though. Or do you think you might want to submit a PR for this yourself?

Separately those focus plots remind me, the focus model could use some updating. It seems pretty clear now the measured LW defocus at 3.2 microns is a property of the F323N filter, not something inherent in the optical system. We should consider updating the defocus model to switch that extra defocus on only for that filter name, and to use more like the LW ideal at that wavelength for other filters.

I can go about submitting the pull request. I've already implemented a rewrite of that function in my local WebbPSF copy, which includes both the WFE information for Lyot pupils as well as the more representative LW focus model (ie., excluding the F323N filter). In the case of F323N, I simply do a check on the instrument filter selection and perform an additional defocus.

The only other thing that differs is that instead of performing a linear interpolation on the values in nircam_defocus_vs_wavelength.fits, I hardcoded a couple polynomial equations that were fit to the focus information (dotted lines in the above plot). This was mostly because I didn't want to generate a new FITS file. :-)

@mperrin
Copy link
Collaborator Author

mperrin commented Jun 26, 2020

This all was implemented in PR #283

@mperrin mperrin closed this as completed Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants