Open douglase opened 5 years ago
@Jashcraf
likely this will be helpful documentation: https://github.com/ajeldorado/proper-models/tree/master/wfirst_cgi
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.
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.
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.
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?
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.
Did WebbPSF just call me lazy? Given my approach I'd have to agree but still
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? 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]
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.
We will follow a very similar procedure as above to swapping the focal plane mask. Although a different keyword & scaling factor was added.
using new wavefront mask design files and add error maps: https://wfirst.ipac.caltech.edu/sims/Coronagraph_public_images.html#Error_Maps