uasal / webbpsf-stsci

James Webb Space Telescope PSF simulation tool
https://webbpsf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

To do: update SPC masks #1

Open douglase opened 5 years ago

douglase commented 5 years ago

using new wavefront mask design files and add error maps: https://wfirst.ipac.caltech.edu/sims/Coronagraph_public_images.html#Error_Maps

douglase commented 5 years ago

@Jashcraf

douglase commented 5 years ago

likely this will be helpful documentation: https://github.com/ajeldorado/proper-models/tree/master/wfirst_cgi

Jashcraf commented 4 years ago

Updating Masks

The files necessary to update the masks for the SPC observing modes are found on the ipac website linked in Ewan's comment above. Two sub-modes exist under the SPC observing mode.

image

The idea of these masks is to introduce a really funky pattern of the pupil that generates an amplitude distribution at the PSF with really high contrast regions. On the figure above you can see the masks we will be adding to the new model.

image

This is the layout of the Roman space telescope (not WFIRST anymore!) coronagraph instrument (CGI), as well as the three observing modes that we will be adding (original vocabulary edited to fit webbpsf model). For an example change, we will go in-order element by element to see what needs to be changed.

Jashcraf commented 4 years ago

The Apodizer (CHARSPC example)

image This is the code in wfirst.py that sets the apodizer. Right now it lets the user select the DISKSPC mode, otherwise it defaults to the CHARSPC mode. It does so by grabbing these fits files in the opics folders. What do they look like?

image Above is the one referenced in the wfirst.py script, below is the apodizer contained in the phaseb data folder. Of note is the considerable difference in scale. We may need to scale down the files before including them in the model.

Given this I have doubts that it will work, but let's try simply replacing the filename and running the jupyter notebook.

image Did WebbPSF just call me lazy? Given my approach I'd have to agree but still

image Roger, so we may need to add a pixelscale header keyword to the new files to make sure they scale appropriately. How is this done in the previous files? image I guess it's a pretty standard edition of two keywords, PUPLSCAL and PUPLDIAM. I'm sure adding these keywords and their associated values is trivial, I just don't know how to do it. Off to astropy documentation for the answers! I'm going to make an educated guess that the old fits file is 256x256, whereas the new one is 1000x1000. I'll maintain the same PUPLDIAM by altering the PUPLSCAL accordingly.

0.0092578125 [m/pix] * (256/1000) = 0.00237 [m/pix]

image The mask looks changed - although, I'm not sure if its upside-down or not.

Well look we successfully ruined our PSF, that's progress!!! I'd be surprised if it worked properly with a different apodizer. image

Jashcraf commented 4 years ago

The Focal Plane Mask (FPM)

We will follow a very similar procedure as above to swapping the focal plane mask. Although a different keyword & scaling factor was added. image