Skip to content

01b) Examples using the WFIRST CGI PROPER model

A J Eldorado Riggs edited this page Sep 19, 2019 · 1 revision

End-to-end WFSC Modeling of the WFIRST CGI with the Official PROPER Model and FALCO

All the pieces of the end-to-end WFIRST CGI diffractive optics model are available online but in separate places. The models provided allow you to simulate high-order wavefront sensing and control (WFSC) (that is, pair-wise probing and Electric Field Conjugation [EFC]) for each of the three coronagraph designs baselined for Phase B of the project. The key feature of these models is that they use a standalone PROPER prescription of the CGI as the full model in FALCO. This framework can be copied for other projects to use FALCO for WFSC and PROPER for a realistic full model.


  1. Install FALCO from Github and PROPER from SourceForge. Refer to the installation instructions.

  2. Clone or download the WFIRST CGI PROPER model repository from It can be installed in any path; you just have to add that path to the Matlab path when running FALCO. Unzip the four zipped files in proper-models/wfirst_cgi/data_phaseb/.

  3. Download the wavefront error maps for the WFIRST CGI optics from the IPAC website. The zipped folder is called Unzip the file and then move all the contents of that folder to the folder proper-models/wfirst_cgi/data_phaseb/maps/.

  4. The WFIRST CGI example scripts are located in the FALCO repository in the folder falco-matlab/wfirst_modeling/. The scripts for the three baselined CGI coronagraph modes are:

  • HLC for narrow-FOV imaging: EXAMPLE_main_WFIRST_PhaseB_PROPER_HLC_baseline.m
  • SPC for spectroscopy: EXAMPLE_main_WFIRST_PhaseB_PROPER_SPC_IFS_baseline.m
  • SPC for wide-FOV imaging: EXAMPLE_main_WFIRST_PhaseB_PROPER_SPC_WFOV_baseline.m If you have custom coronagraph designs that you want to use instead, you can use the modified versions in which you have to specify the mask files in a similar format to the baselined designs:
  • HLC for narrow-FOV imaging: EXAMPLE_main_WFIRST_PhaseB_PROPER_HLC_custom.m
  • SPC for spectroscopy: EXAMPLE_defaults_WFIRST_PhaseB_PROPER_SPC_IFS_custom.m In these cases, the custom mask files need to be put in sub-directories within the folders proper-models/wfirst_cgi/data_phaseb/hlc_custom/ for HLC or proper-models/wfirst_cgi/data_phaseb/spc_custom/ for SPC.

Near the beginning of these scripts, make sure to add the MATLAB path the directories for the CGI proper models. For example:

  • %--Functions for when the full model uses PROPER
  • addpath('~/Repos/proper-models/wfirst_cgi/models_phaseb/matlab');
  • addpath('~/Repos/proper-models/wfirst_cgi/models_phaseb/matlab/examples'); You will need to change the value of the variable mp.full.input_field_rootname, which is the absolute path and filename prefix of the pupil E-field files that need to be saved out from the PROPER model. You will also need to open the EXAMPLE_defaults_* file called at the beginning of the script and edit the variable mp.full.data_dir to be the absolute path to your installation of proper-models/wfirst_cgi/data_phaseb. If you are testing a custom (non-baselined) design, you will need to define the paths and filenames for your custom masks.

Ignore everything in each of the main scripts after the line saying, % FLUX RATIO NOISE (FRN) ANALYSIS SECTIONS. That code computes tables of performance values used for planet yield performance. The actual calculator that uses those tables is not released yet.

You can’t perform that action at this time.