Example Science Program #33 ETC GuideA walkthrough of the JWST ETC for the NIRISS WFSS Example Science Program is provided, demonstrating how to select exposure parameters for this observing program. 
IntroductionMain article: NIRISS Wide Field Slitless Spectroscopy, JWST ETC Exposure Time Calculator Overview The JWST Exposure Time Calculator performs signaltonoise (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. For the "Using NIRISS WFSS and NIRCam Imaging to Observe Galaxies Within Lensing Clusters" Example Science Program, we focus on selecting exposure parameters for NIRISS WFSS as the prime observing mode. Direct images are taken before and after each set of dithered grism exposures for the NIRISS WFSS mode. We start by defining a scene of sources relevant to this science case. We show how to run ETC calculations to achieve the desired SNR for both the direct imaging and grism observations. 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 (e.g., number of groups and integrations) are the input needed for the Astronomer's Proposal Tool (APT) observation template, which is used to specify an observing program and submit proposals.
Define Sources and Scene in the ETCMain articles: JWST ETC Scenes and Sources Page Overview Define sources for the "Multiple Galaxies" sceneMain articles: JWST ETC Defining a New Source, JWST ETC Source Spectral Energy Distribution We first set up a scene with multiple galaxies with a range of magnitudes and SED types. We define the following sources in ETC:
Assign sources to "Multiple Galaxies" sceneMain articles: JWST ETC Defining a Scene After assigning these sources to one ETC scene, by highlighting them onebyone and clicking the "Add Source" button in the "Select a Scene" tab, and renaming the scene "Multiple Galaxies", we applied the following offsets to the sources within the scene:
Note that since the first three galaxies are point sources, orientation need not be specified in the "Offset" tab. The position of the sources in the scene can be viewed in the lower left "Scene Sketch" pane. By checking the checkbox in the "Plot" column in the "Select a Source" pane, the SEDs of the selected sources can be overplotted and easily compared (note: it may be helpful to limit the wavelength axis to the range relevant to the NIRISS WFSS mode, i.e., 0.8  2.2 µm). Run ETC calculation for direct imagingMain article: JWST ETC Calculations Page Overview, JWST ETC Creating a New Calculation, JWST ETC Imaging Aperture Photometry Strategy Select NIRISS Imaging CalculationA direct image is taken before and after each set of dithered grism exposures in NIRISS WFSS mode. This program uses both the GR150R and GR150C grisms, which disperses the light in orthogonal directions. There are therefore four direct image exposures per filter. The F115W, F150W, and F200W filters are used in this program. Our goal is to detect Galaxy m_{AB} = 28 at a SNR ~10 among the four coadded images in each of the filters, so we run ETC calculations for NIRISS/Imaging for the three filters above to determine the exposure parameters we need to achieve this SNR. Since the JWST background is position dependent, fully specifying background parameters are important for the most accurate SNR calculation. We therefore entered the coordinates of one of the HST Frontier Fields (04:16:09.40 24:04:04.00) in the "Backgrounds" tab, and selected "Medium" for "Background configuration," which corresponds to the 50th percentile of the sky background. Select Instrument ParametersCalculation #1 represents our initial calculation to assess the SNR with (mostly) default parameters, as follows:
Run ETC CalculationRunning the calculation with these parameters gives a SNR of 10.8, as reported in the upper left "Calculations" pane and the bottom right "Reports" pane. To calculate the SNR in the other filters, we selected "Copy Calculation" in the "Edit" pulldown menu. We copied this calculation twice, and updated the filters in the "Instrument Setup" tab for the new calculations to F115W and F150W (Calculations #2 and #3, respectively). Running these new calculations on the updated filters shows the SNR is under 9 for both filters. Adjust Exposure Parameters to Obtain Desired SignaltoNoise RatioThe SNR in the F150W filter is the median value, so we wanted to determine the number of groups needed to achieve a SNR ~10 in this filter. To efficiently run this calculation for a range of groups, where only the number of groups is varied, we used Batch Expansion. Calculations #4 through #8 shows the results of this exercise, where we updated the start value of number of groups in Batch Expansion to 11 and kept the step size and number of iterations at their default values of 1 and 5, respectively. We see that with number of groups ≥ 13 (Calculations #6 through #8), we achieve a SNR > 10. Since this program is a coordinated parallel program with NIRCam imaging, there is a balancing act when choosing exposure times. The exposure times for the coordinated mode (including overheads) can not exceed the exposure time of the prime observing mode. However, minimizing dead time, when the coordinated mode is not observing, is also important. From experimentation in APT, we find that choosing 13 groups for NIRISS WFSS direct imaging allows us to achieve our SNR goals while making efficient use of simultaneous NIRCam imaging observations (see the StepbyStep APT Guide for the corresponding NIRCam specifications). In general, determining optimal exposure parameters may involve some iteration between ETC and APT. To determine the SNR for the other filters, we copied the calculations where the number of groups equals 13 (Calculation #6) twice, and updated the filters to F115W and F200W (Calculations #9 and #10, respectively). By selecting the checkbox next to the calculations corresponding to these exposure specifications (number of "groups per integration" = 13, number of "integrations per exposure" = 1, number of "exposures per specification = 4) for the various filters (Calculations #6, #9, and #10), we can compare the predicted SNR through these calculations in the "Plots" pane. Examine SignaltoNoise Ratio for Parallel NIRCam Imaging ObservationsNIRcam imaging observations are taken of a nearby field during the NIRISS WFSS exposures. As discussed in more detail in the StepbyStep APT Guide, there is a set of NIRCam exposures in the short wavelength channel and long wavelength channel for each set of NIRISS WFSS Direct Image → GR150 → Direct Image exposures. The longest NIRCam imaging exposure sequence is observed in parallel with the set of dithered NIRISS GR150 exposures. In Calculations #2324, we show NIRCam Imaging exposures for one of these sets of parallel observations to the dithered GR150 exposures for illustrative purposes. Our set up is as follows:
From this exercise, we see that if a galaxy with m_{AB} = 26 is in the field, it would be detected with a SNR of ~67 in the F090W filter (Calculation #23) and with a SNR of ~105 in the F227W filter (Calculation #24) when using these exposure parameters. Run ETC calculation for WFSSMain article: JWST ETC Aperture Spectral Extraction Strategy Select NIRISS WFSS CalculationThis program uses an 8step dither pattern for each filter (see NIRISS WFSS Recommended Strategies for a discussion about the tradeoffs between dither size and number of dither steps). Our goal is to obtain a SNR ~ 3 per pixel in the emission lines from the Emission Line Galaxy from the coadded dithered WFSS exposures. We initiated a NIRISS/WFSS calculation and updated the background tab as above for the direct imaging calculations (i.e., the coordinates were set to 04:16:09.40 24:04:04.00 and we selected "Medium" for "Background configuration"). Select Instrument ParametersCalculation #11 represents our initial calculation to assess the SNR with (mostly) default parameters, as follows:
Run ETC CalculationWith these parameters, we find SNR of ~2.4, which is too low. Adjust Exposure Time to Obtain Desired SignaltoNoise RatioSimilar to the direct imaging calculation, we used batch expansion to repeat the calculation, increasing only the number of groups, using a starting value of 16, 9 iterations, and a step size of 1 (Calculations #12  #20). It is recommended to limit NGroups to 25 with the NIRISS NIS Readout Pattern to mitigate the impact of cosmic ray hits which can result in discarded frames. We find that with number of groups ≥ 16 (Calculation #12), the SNR exceeds 3. Similar to the experimentation we did to match up parallel NIRCam Imaging exposures with NIRISS WFSS direct imaging exposures in APT, we strike a balance between maximizing NIRCam exposure time within the exposure time window allowed by the prime NIRISS WFSS exposures. We find that for 23 groups, we make the most efficient use of a simultaneous NIRCam observation while achieving a WFSS SNR of 3.6 (Calculation #19). To determine the SNR in filters F150W and F200W for this exposure specification, we copied Calculation 19 twice, updated the filters to F150W and F200W (Calculations #21 and #22, respectively), and set the wavelength of interest in the "Strategy" tab to the wavelengths of the emission lines (i.e., 1.5 µm and 2 µm). We find a SNR ~5 through both filters with this exposure setup.

