ETC Step-by-Step Guide for MIRI Coronagraphic Imaging of GJ 758 B

The parent article for this example has not been reworked for Cycle 1.  Leave this article in Draft.  (DO NOT PUBLISH.)


Main article: JWST High-Contrast ImagingMIRI Coronagraphic ImagingJWST ETC Exposure Time Calculator Overview
See also: Video Tutorials 

The JWST Exposure Time Calculator performs signal-to-noise (SNR) calculations for the JWST observing modes. Sources of interest are defined by the user and assigned to scenes which are used by the ETC to run calculations for the requested observing mode.

Following instructions outlined in the HCI Roadmap, we provide a walk-through of the ETC for the Example Science Program MIRI Coronagraphy of GJ 758 b, demonstrating how to select exposure parameters with MIRI Coronagraphic Imaging as the prime observing mode. 

We start by defining the scenes and sources relevant to this science case. We then show how to configure and run ETC calculations to investigate detector saturation and compute the signal-to-noise ratio (SNR) on our targets under the under the ideal contrast assumption. An accompanying ETC workbook on which this tutorial is based can be downloaded as a sample workbook from the ETC user interface.

The optimal exposure specifications determined will provide input needed for the Astronomer's Proposal Tool (APT) observation template, which is used to specify an observing program and submit proposals.

Defining Scenes and Sources

Main articles: JWST ETC Scenes and Sources Page Overview
See also: JWST ETC Defining a New SceneJWST ETC Defining a New SourceJWST ETC Source Spectral Energy DistributionsJWST ETC User Supplied Spectra
Video tutorials are available for Building ETC Sources and Scenesenter image description here

Our stage in our investigation is to build a library of the necessary sources and scenes on which to perform our intended calculations. In the ETC, scenes are idealized representations of spatial (two angular coordinates) and spectral brightness distributions, before being observed by a telescope. For MIRI Coronagraphic Imaging, calculations are performed over an area of 8.19 square arcseconds centered on the scene center; a scene should contain the source targets of an observation, and all other nearby sources that could contribute to the observed target and background fluxes within that area. k, and any update to a source or scene will affect all calculations in which that source or scene is used. 

Defining Sources for "Science" Scene 

In order to set up our calculations in the ETC, we must first define a "science" scene in which to associate our sources. Once the scene has been created, we will populate it with three sources: one associated with the star GJ 758; a second associated with the brown dwarf GJ 758 b and a third associated with our chosen PSF reference star, GJ 777 A.

While we are able to adequately define the spectral energy distributions (SEDs) of our stars using template stellar spectra provided by the ETC, we will need to supply our own spectrum for the companion, GJ 758 B. To do this, we downloaded a synthetic spectrum (Teff = 1000K, logg = 4) obtained from Saumon et al. 2012's T dwarf spectra modelsenter image description here, which we then fit to NIR data and prepared the file according to the formatting criteria for user supplied spectra in the ETC. 

The prepared file can be downloaded here:

Once obtained, the (above) spectrum file can be uploaded to the ETC through the the Upload Spectra page.  

Returning to the Scenes and Sources page, we create two new default sources and explicitly associate each source with the "Science" scene.

We then define the properties of each source (in the Source Editor (question) pane) as follows:

Source #1: the star, GJ 758:

GJ 758 is a bright (V=6.36 mag) G8V star with an effective temperature of 5425 K (Soubiran et al. 2008). Once we have defined the identity information for both the source and the scene under the ID tab. 

  • We rename the scene as "Science Scene" and the source as "GJ 758 (the star)" under the ID tab.
  • We assign 
  • Under the ID tab we rename the scene "Science Scene" (in the Scene Identity Information field) and name the source "GJ 758 (the star)" (in the Source Identity Information field).
  • Under the Continuum tab we select the "K0V 5250 4.5" stellar spectral template from the Phoenix stellar models library for the source's Spectral Energy Distribution. 
  • stellar template Spectral Energy Distribution from the Phoenix stellar models named "K0V 5250 4.5" (i.e. spectral type of K0V, effective temperature of 5250K, and gravity (log g value) of 4.5).
  • In the Renorm tab we normalize source spectrum to the observed "Bessel" "K" magnitude of "4.5" "vegamag".
  • We leave the default values in the Lines tabShape tab and Offset tab, so that the source remains a point source positioned at the center of the scene.

Source #2: the companion, GJ 758 b:

  • Under the ID tab we update the name of the source to "GJ 758 b (the companion)" in the Source Identity Information field.
  • Under the Continuum tab we assign the user-supplied spectrum that we uploaded for GJ 758 B to the source by selecting it from the Uploaded Spectra menu.
  • Under the Renorm tab we Normalize the Source Flux Density to the observed "Bessel" "H" magnitude of "18.16" "vegamag".
  • We leave the default line and shape values under the Lines tab and Shape tab.
  • Under the Offset tab we define the Position of the Source in the Scene to be at an X offset of "-0.89" and Y offset of "1.06".

Source #3: the reference PSF star, GJ 777 A:

  • Under the ID tab we update the name of the source to "GJ 777 A (the reference PSF star)Source Identity Information field.

  • Under the Continuum tab we select a stellar template Spectral Energy Distribution from the Phoenix stellar models named "KOV 5250 4.5", (i.e. a model spectrum of spectral type = K0; Teff = 7250K and gravity logg = 4.5).

  • Under the Renorm tab we Normalize the Source Flux Density to the observed "Bessel" "K" magnitude of "4.076" "vegamag".

  • We leave the default line and shape values under the Lines tab and Shape tab.
  • Under the Offset tab we set an X offset of "10" and Y offset of "10", positioning the PSF reference source sufficiently far from the GJ 758 system, as not to contaminate the calculated SNR on those targets.

Once defined, the sources may be examined in the 
Scene Sketch and Source Spectrum Plots to ensure the desired parameters for spectral characteristics, morphology, and location in the scene have been applied. We use the Scene Sketch pane, which contains an idealized representation of the astronomical scene, to check that the sources reflect the shape and offset paramaters we defined above. We also inspect the Source Spectrum Plots to check the synthetic spectra we supplied for "GJ 758 b" has been applied to the correct source (see Figure 1).

Figure 1: Scene Sketch and Source Spectrum Plot of GJ 758 b (the brown dwarf companion)

Screen-grab of the Scene Sketch pane and Sources Spectrum Plots. Displayed in the Scene Sketch is an idealized 2D representation of our "Science Scene", containing the three targets defined above. The Source Spectrum in the Source Spectrum Plots is the synthetic spectrum we uploaded for GJ 758 b.

Screen-grab of the Scene Sketch and Source Spectrum Plots panes in the Scenes and Sources page. The Scene displayed in the Scene Sketch is the "Science Scene" and the Source Spectrum in the Source Spectrum Plots is the synthetic spectra we uploaded for GJ 758 b.

Defining a Source for "Reference" Scene 

Video tutorials are available for Building a Scene with an Existing Source Libraryenter image description here

We also require an additional "reference" scene in our workbook, intended for performing the target acquisition (TA) calculations on the reference PSF source (GJ 777 A). First we create a new scene (by clicking NEW on the Select a Scene (question) pane) and associate GJ 777 A to this scene by highlighting both the GJ 777 A source (ID #3 in the Source Table) pane and the new scene, "Scene 2" (ID #2 in the Scene Table), and then clicking ADD SOURCEWhile both the scene (ID#2) and source (ID #3) remain selected (their rows appearing green and yellow striped, as shown in Figure 1), we can update the Scene Identity Information entry in the ID tab of the Source Editor (question) pane to "Reference Scene". By default, the source will be placed at the center of the scene (offset 0,0), which is suitable for our intended use.

Figure 1: Defined Scenes and Sources
Screen-grab of the Select a Scene and Select a Source panes on the Scenes and Sources page. The Science Scene contains three sources (1,2,3) and is currently assocated with 0 calculations. The "PSF Reference Scene" is contains a with a single source, ID 3.

Coronagraphic Calculations

Main article: JWST ETC Calculations Page OverviewJWST ETC Creating a New Calculation
See also: Video Tutorials

We now proceed to the Calculations Page where we will begin creating, comparing and modifying our calculations. 

In order to initialize a MIRI Coronagraphic Imaging calculation, we click the "MIRI" instrument button in the Calculations table and select the "Coronagraphic Imaging" mode from the drop-down list provided. A new calculation will run with a set of default values and appear in the Calculations table with the following columns: IDCheckboxModeλScene, (s)SNR and status

Modifying Calculations

Selecting a calculation, so that the row corresponding to that calculation is highlighted in the Calculation table, will activate the Configuration pane, where we can specify the following parameters: a scene from our scene and sources library; the instrument and detector setup; our PSF calibration strategy and extraction strategies for the source and background. 

Understanding Exposure Times

Like other instruments on JWST, MIRI detectors integrate using the MULTIACCUM readout, which consist of "up-the-ramp" sampling that utilizes a combination frames, groups, integrations, and exposures to arrive at a total exposure time. However, unlike the other instruments, each MIRI group is limited to only one frame.

For MIRI, an exposure consists of one or more identical integrations that are grouped together and each integration is a ramp composed of a number of groups.

In each of the corresponding tabs, we define our calculations as follows:

Calculation 1 — coronagraphic imaging at 10.65um


  • we specify the Scene for Calculation to be "1: Science Scene"

Backgrounds tab:

  • we specify the J2000 RA and Dec for the position in the sky as "19:23" and "+33 13".

  • we set an estimated date at which to calculate the background to be "Apr 1st 2021", which we determined using our previous work with the CVT.

Instrument Setup tab:

  • we select a Coron Mask/Filter configuration of "4QPM/F1065C"

Detector Setup tab:

  • we keep the Subarray (based on selection in Instrument Setup) 

  • we select the Readout Pattern to be "FAST

  • we set the number of Groups per integration to be "300"

  • we set the number of Integrations per exposure to be "8" 

  • we set the number of Exposures per specification to be "1"

Observation (Strategy) tab:

  • we define a Scene rotation of "170" degrees (the optimal aperture position angle of the scene as determined from our previous work with the JWST Coronagraphic Visibility Tool, which we found the companion "GJ 758 b" positioned in the middle of quadrant 2 and well away from the boundaries of the 4QPM)

  • we select the PSF subtraction source to be "3: GJ 777 A (the reference PSF source)"

  • we chose the PSF subtraction option "Optimal (PSF Autoscaling)" (i.e. the PSF subtraction source will be scaled to match the central source before subtracting)

Extraction (Strategy) tab:

  •  we define our SNR source to be "2: GJ 758 b" (i.e. the faint source for which the SNR has to be calculated)

  •  we set the Aperture radius of the circular extraction aperture to be "0.3" arcsec;

  •  we define the the Sky annulus to have an Inner radius of "0.45" arcsec and Outer radius of "0.7" arcsec;

  •  we set angle at which the contrast plot will be computed, Contrast azimuth,to be "45" deg ccw (i.e. the expected angle along which the faint source of interest is located)

  •  we define the Contrast separation to be as "1" arcsec, which is the separation along the direction specified by the azimuth angle at which the scalar values are reported.

Calculation 2 — coronagraphic imaging at 11.4um 

Because this calculation will share many of the same configuration parameters as our previous calculation, we simply copy and modify the existing calculation for the 11.65 um 4QPM


we use the Copy Calculation feature from the Edit menu at the top left of the page. Following this, we need only amend the Instrument- and Detector Setup as follows:


  • we select a Coron Mask/Filter configuration of "4QPM/F1145C"

Detector Setup

  • we keep the Subarray (based on selection in Instrument Setup) 

  • we select the Readout Pattern to be "FAST" (Nsamples= 1,t1 = 2.775 s)

  • we set the number of Groups per integration to be "300"

  • we set the number of Integrations per exposure to be "8" 

  • we set the number of Exposures per specification to be "1"

Calculation 3 — coronagraphic imaging at  15.5um

As with our previous calculation, we use the Copy Calculation feature and amend the Instrument- and Detector Setup as follows:

Instrument tab:

  • we select a Coron Mask/Filter configuration of "4QPM/F1550C"

Detector Setup tab:

  • we keep the Subarray (based on selection in Instrument Setup) 

  • we select the Readout Pattern to be "FAST" (Nsamples= 1,t1 = 2.775 s)

  • we set the number of Groups per integration to be "300"

  • we set the number of Integrations per exposure to be "12" 

  • we set the number of Exposures per specification to be "1"

The background Model used by the ETC accounts for various components that contribute to the JWST background. This includes in-field components from the zodiacal cloud and Milky Way, out-of-field stray light, and thermal emission from the telescope. In-field zodiacal emission dominates from 4 to 15 μm, and thermal self-emission (mostly from the JWST primary mirror segments, as well as scattered thermal emission from the sunshield) will dominate wavelengths longward of 15 μm. 

It is important to note that the thermal self-emission of JWST will be characterized on-orbit, and currently the ETC assumes that the thermal self-emission is constant with time and pointing. This may be of importance for our 15.5 micron observations. 

Running Calculations and Analyzing Results

Main article: JWST ETC Calculations Page Overview
See also: JWST ETC Outputs OverviewJWST ETC Reports

The Reports Pane presents scalar results, warnings, and errors for the selected calculation, as well as a download link. Downloads include all two- and one-dimensional products, the three-dimensional data cube for IFU calculations, and a FITS table of the calculated background spectrum.

The Calculations page offers us the ability to do a comparative analysis of multiple calculations and to determine which exposure configuration offers the best signal-to-noise ratio (SNR) for each of our observations. To perform a calculation, we click the Calculate button at the bottom right of the configuration pane. For each calculation it performs, the ETC will produce two-dimensional images, one-dimensional plots and scalar diagnostics. In the Reports Pane we find the scalar results, warnings, and errors for each selected calculation, as well as a download link containing all of the 2D and 1D products and a FITS table of the calculated background spectrum.


The images available for our calculations can be viewed using one of the four tabs: (1) 2D SNR (per-pixel SNR over the 2D scene), (2) Detector (count-rate in e/sec for each detector pixel), (3) Saturation (2-D distribution of the saturated pixels) and (4) Groups Before Saturation (maximum number of groups before that pixel saturates). For each image, the individual pixel values are displayed when we hover the cursor over each pixel; the and values correspond to the horizontal and vertical locations in the scene, respectively, and the value corresponds to the value in that pixel (which depends on the image being examined). The images contain the entire scene, but it is also possible for us to zoom-in on the image to examine a region of the image more closely. 

If the exposure time or the number of groups for a given calculation are too large, saturation will occur, starting with detector pixels close to the image of the coronagraphic mask on the detector. As a consequence, faint portions of the circumstellar scene that overlap with the saturated pixels may not be properly detected. When saturation is encountered we use the Saturation map to examine the exact locations of the saturated pixels and decide whether they will be problematic; if saturated pixels are located at the expected position of the companion ("2: GJ 758 b") we proceed by trail and error, varying the readout pattern and number of groups until all pixels within the region of interest are no longer saturated. 


We use the Plot pane for two purposes: to visualize the output from a single calculation and to compare the results from multiple calculations simultaneously by over-plotting them. Each plot can be selected using one of the tabs within the Plots pane: (1) ApFlux (extracted flux from the sources in the aperture versus wavelength); (2) ApBackground (extracted sky background flux versus wavelength); (3) SNR (SNR versus wavelength), (4) SNR (time) (SNR versus exposure time) and (5) Contrast (contrast versus separation).  

For each of our base calculations, we perform batch expansions over a range of detector parameters (groups and integrations) to determine which set of exposure parameters result in the desired SNR for our observations. Plotting the results from the batch expansions simultaneously in the SNR (time) plot, the exposure time required to obtain the desired SNR can be read directly from the graph. 

Final Results

In F1065C and F1150C  we find an exposure time of ~ 600 s yields predicted SNR ~ 35 and 60, respectively, in one roll, or ~ 50 and 85 combined across the two rolls. As our key goal is to compare the 10.65 and 11.4 μm measurements (to measure the NH3 absorption), we use the same readout settings in both filters to minimize systematics between them. We note that these are the optimistic photon noise limited SNRs, and in practice, systematics from imperfect PSF subtraction and other calibrations (e.g. overall photometric calibration of MIRI) will also contribute limits, plausibly at a level of a few percent; by aiming for photon-limited SNR > 50 in the roll-combined data we seek to ensure the statistical photon noise is low enough to be below the likely systematic noise terms. In F1550 with the much higher thermal background an exposure time of ~900 s yields predicted SNR ~ 17 in one roll, or 24 in the two rolls combined, which is sufficient for our science goals in constraining the long-wavelength continuum.

Limiting factor for F1550C coronagraphy is the thermal background from the primary mirror and sunsheild thermal emission, which is included in the background model used by the ETC. 

For F1065 and F1150 we adopt 575 s (NGROUPS = 300, NINTS = 8 with FAST readout of the coronagraphic subarrays). For F1550C we increase the number of Integrations by 50% to partially make up for the higher thermal background. The specific exposure settings chosen were verified in the ETC to not produce any warnings. In 300 groups the peak pixel will remain < 25% of full well so there is no danger of saturation. (Saturation warnings do not appear until above NGROUPS = 1200). As noted above each filter is repeated in two observations at different rolls.

The PSF star is 0.4 mag brighter than the science target (=45%; checked at both 2MASS and WISE bands), so we adjust the integration time to be 1/1.45 ~ 0.68x as long in each filter, to achieve similar peak count per integration in the PSF star as in the science target. Since we are using the 9- point SGD option, we also reduce the number of ints per dither position by 2x to keep the total exposure time from becoming excessive ("excessive" taken to mean PSF exposure time >= 2x the total on-source science exposure time summed across the two rolls). Since the full set of PSF calibrator dither positions is combined to generate the KLIP eigenbasis, we do not need to achieve the same SNR per each individual dither position as on the science target. Specifically we expect the SNR of the PSF relative to the science target to be between 1/sqrt(2), for individual dither positions, and 3*sqrt(2), for the combined KLIP reference library mean PSF mode. 

Target Acquisition

Main article: JWST ETC Creating a New CalculationJWST ETC Target AcquisitionJWST ETC MIRI Target Acquisition
See also: MIRI Coronagraphic Imaging Target AcquisitionMIRI-Specific Treatment of Limiting Contrast

very precise centering of target on vertex of quadrants – Tolerance ≤ 5 mas (single axis, 1sigma)

MIRI coronagraphic imaging observations require precise and accurate positioning of a bright source at the location of maximum attenuation by the coronagraphic mask. For the 4QPM, the required absolute accuracy of placing a star a the apex between four quadrants is 10 mas (1-σ per axis), but the ultimate positioning of the object on the mask requires a repeatable precision of 5 mas (1-σ per axis, i.e. an alignment accuracy requirement of5 mas between the reference target and the science target).  In order to achieve the centroid accuracy requirements, the exposure specification for the TA calculations should be chosen to obtain the minimum required SNR of 30. Saturation can also affect the accuracy of the centroiding procedure, and should be avoided.

To initialize a MIRI TA calculation, select Target Acquisition from the MIRI Instrument drop-down menu in the Calculations Pane. To set up a calculation, we change the following in the Configuration pane.


Soubiran, C.; et al. (2008). "Vertical distribution of Galactic disk stars. IV. AMR and AVR from clump giants". Astronomy and Astrophysics. 480 (1): 91–101.