Custom MOS Observations using the MSA Configuration Editor (MPT Re-Write)
The JWST NIRSpec MSA Configuration (Config) Editor is designed to help the user manually create new MSA Configurations or to modify existing ones for application to a MOS Observation.
It is possible to create MOS observations that do not involve the use of the MSA Planning Tool (MPT), and it is also possible to modify MOS observations that were created from Plans
* in MPT. In this article, we describe several less common workflows for producing MOS observations that are supported by the MSA Configuration Editor, which is a tool that is accessed directly at the Observation level in APT. Among them are:
- modifying an existing MSA configuration in an Observation
- Designing a MOS Observation using custom MSA configurations designed from scratch
- importing externally designed MSA configurations for use in a NIRSPec MOS Observation
Additionally, the article Long Slit MOS Observations describes how to use the built-in long slit MSA configurations for observing extended moving or fixed targets.
*Bold italics style indicates words that are also parameters or buttons in software tools (like the APT and ETC). Similarly, a bold style represents menu items and panels.
Modifying an existing MSA configuration
In this section, we are starting from the assumption that a MOS Observation has already been generated from a Plan created with the MSA Planning Tool. To modify an existing MSA configuration in this observation, select the Observation you wish to modify in the Observation Folder of your APT program, as shown in Figure 1. Make sure you are in the Form Editor (the upper left icon in the APT GUI should be highlighted). Scroll down to the Science Parameters section. The Primary and Filler Candidate lists and Aperture PA used to design the observation in MPT are shown, but are not editable. There are also two tables in this section, one called Exposure Specifications, and one called Configurations/Pointings. For each entry in the first table, there can be one or more entries in the second table. If the Observation was derived from a Plan made in MPT, some of the parameters in the tables will not be editable. Observations designed with MPT are for specific pointings and angles, and changing one or the other could move sources out of their intended slits in the MSA configuration.
Note that in the Configurations/Pointings table, any nods designed in MPT are shown together on a single row of the table. The column for Total Dithers in Figure 1 indicates 3 for the 3 nods in this example. This table also includes a column indicating the name of the MSA configuration used. At the right end of the table, there is a column called "Edit Config", with an "Edit" button on each row to edit the MSA configuration associated with that exposure. Multiple entries in the Configurations/Pointings table may use the same MSA Configuration. Clicking that button will bring up a window, called the MSA Configuration Editor.
MSA Shutter View
In this and the following sections, as we walk through this workflow, we will point out other features and options of the MSA Configuration Editor that may be useful for other workflows.
When the MSA Configuration Editor is opened on an exposure made with MPT, the MSA shutter view is presented, as shown in Figure 2. This figure is shown projected toward the sky, displaying the planned Primaries, Fillers and/or Contaminants for the exposure. From left to right and top to bottom, the 4 quadrants are Q3, Q1, Q4, and Q2. Between quadrants Q3 and Q4 are the outlines of the IFU aperture and four of the fixed slits. Another fixed slit is shown between quadrants Q1 and Q2. The figure also shows inoperable shutters in grey that have been compiled from the most recent shutter operability data. Hovering the mouse over a single micro-shutter provides its position in the MSA and its state (commanded open or closed, stuck open or closed, etc.) This can be seen in the figure, where the text in the upper left of the window indicates that shutter "q3d300s6 is STUCK_CLOSED". This is quadrant 3, shutter 300 in dispersion and shutter 6 in the spatial direction.
The parent Catalog and candidate lists may be overplotted by selecting one or more of them from the list below the MSA Shutter View. Note that all sources from the added lists appear as black square symbols in the MSA Configuration Editor, to distinguish them from the planned sources which are shown as colored dots. The dot colors are green=Primary, blue=Filler, and black=Contaminant. Masked regions around each planned source are shown in light orange. Opening another shutter in these regions will cause a conflict since the spectra from the new shutter will overlap with that of another source. When this happens, conflicts are indicated in dark magenta. Failed open shutters are shown as single red shutters scattered around the MSA with their own light red masked regions. Areas shown in white on the MSA Shutter View are areas that are not used in the MSA Configuration.
It is possible to zoom in to view individual shutters in the MSA Configuration Editor, as shown in Figure 3.
Zooming in to shutter level is accomplished by clicking the right mouse button and dragging downward. This is usually enabled on a trackpad by depressing two fingers at once and dragging in a downward motion. Use the upward motion to zoom back out. A scroll action with the mouse can be used on some platforms. Using the arrow keys to zoom in and out is yet another option that works on some platforms. On a Mac, there are keystrokes that can be used for zooming: command-"+" to zoom in, command-"-" to zoom out, and command-"0" to reset or re-initialize the display.
Manipulating the shutters
The MSA Configuration Editor can be used to close the shutters of planned sources that are not wanted, and open shutters that correspond to preferred sources of interest, as shown in Figure 3. Individual operable shutters may be commanded opened or closed with a "left click" on the mouse or trackpad. Inoperable shutters (failed closed shutters, shorted rows and columns) shown in grey cannot be planned open on sources or background.
The Open all and Close all buttons can be used to open or close all the operable shutters in the MSA. These should not be used when simply modifying an existing MSA configuration to swap out a few sources. They have been provided for creating specialized MSA configurations for use with protected target acquisition, or for the creation of exposures for MSA leakage calibration.
There is also a shortcut to make a long slit configuration: point the mouse at a column of shutters, and use Ctrl-Left-Click to open (or close) the column of shutters. However, built-in long-slits have been provided in the MSA Configuration pull-down menu within the observation template for convenience, so it should not usually be necessary to make one with the MSA Configuration Editor.
Adding Master Background shutters
Instead of, or in addition to, altering the MSA Configuration to exchange planned sources, you may wish to simply add open shutters for the purpose of building a master background spectrum. Scattered shutters or slitlets can be opened in available areas of an MSA Configuration for this purpose, as described above. When the Master Background button is also enabled, the spectra from all shutters without planned sources (including the background shutters in slitlets with sources) will be extracted and co-added in the pipeline to create a master background spectrum for subtraction from extracted target spectra. This applies to all exposures that use the same named configuration. For observations of moderately extended sources this may not be desirable, since the sources may occupy some of the shutters adjacent to the "target" shutters. In this case, the user would need to re-process the data so that the master background is made from just the scattered shutters and not those with sources in the slitlets.
When adding Master Background shutters, it is advised to overlay the entire Catalog on the MSA shutter view to confirm that there are indeed no other sources within the open shutters that may contaminate the master background spectrum.
Export and import of MSA configurations
There are buttons below the MSA Shutter View area of the MSA Configuration Editor to export and import MSA configurations as CSV files. These are shown in Figure 3. The export and import options are intended for expert users who wish to manipulate MSA configurations outside of APT. Source positions at the MSA must be corrected for instrument and telescope geometric distortions, which require special tools. These buttons are not needed for editing an existing MSA configuration, but are treated here for completeness. Users wishing to create MSA configurations outside of MPT must do so at their own risk.
An MSA configuration can be exported using the Export to CSV button. Export to CSV produces an ASCII file of comma-separated values that can be shared and imported into the MSA Configuration Editor with Import CSV. The exported CSV file has values of '0', '1', 's', or 'x' for each commanded open, commanded closed, failed open, or failed closed shutter, respectively. The exported CSV file can be used as input to the MSAViz tool to obtain information about the wavelength coverage for each source in the MSA configuration.
Batch import of pre-existing CSV forma MSA Configurations is also possible from the observation template using the "Import Configuration(s)" button beneath the Configurations and Pointings table. This feature allows sharing of MSA configurations between members of an observing team. Expert users who may have tools to create or modify MSA configurations outside of APT can use this feature to import them into an Observation. Additionally, entire MPT Plans and APT programs themselves can be can be exported from the Plans tab of MPT. This capability is convenient for sharing between team members, as all of the Plan information is kept together. It is also possible to export the MSA target information as an ASCII file. To do this, select File → Export→ MSA Target Info in the main menu bar of the APT GUI found at the top of the screen when APT is active. The exported MSA Target Info file can be examined outside of APT. This format is more accessible and useful for tracking observed target information in an observation.
Send shutters to Aladin
The "Send Shutters to Aladin" button below the display area in the MSA Configuration Editor can be used to view the MSA shutter configuration in Aladin. The shutters can be displayed overlaying an image of the field, to see where they will fall with respect to the sources. A NIRCam pre-image is the best option, when available, since the alignment between NIRCam and NIRSpec will be checked and updated soon after launch. Other images can be loaded from the MAST archive to Aladin for display. For an example, see Figure 4.
The Collapsed Shutter View
The planned sources may be examined in the Collapsed Shutter View (Figure 5) which is obtained by clicking on the "Collapsed Shutters" icon on the left panel in the MSA Configuration Editor. This view shows each target's position in its own shutter, all plotted together in a single virtual shutter. MSA bars are shown in grey, and the open area of the shutter is the yellow area. The Source Centering Constraint shown with a dashed white line should be the one used in the MPT Plan from which the MSA configuration was made. These shutter constraints are described in the NIRSpec MPT - Planner. This view is useful for checking if any of the replacement sources in our newly edited MSA Configuration fall outside the original margin of interest.
Note that there are several configuration-related fields at the bottom of the MSA Configuration Editor window (Figures 2, 3 and 5). Though the following fields may not be useful in the workflow we are describing here, they are provided to present a complete description of the MSA Configuration Editor in one place, before moving on to our second workflow:
The MSA Configuration Name can be assigned using this field in the MSA Configuration Editor.
Base Pointing equatorial coordinates RA and Dec values are also shown. The Base Pointing contains the sky coordinates for the MSA Center (the reference position of the MSA aperture). Since the Base Pointing coordinates are within the Catalog area, the source positions from the Catalog will also appear in the MSA shutter view.
Note that in the workflow we are discussing here, the Base Pointing is greyed out and is un-editable. That is because the MSA configuration comes from a Plan made in MPT, and altering it would invalidate the MSA Configuration that was designed to observe a set of sources in small slitlets at a fixed angle.
Dispersion Offset and Spatial Offset
It is possible to apply pointing offsets to an MSA configuration using the fields Dispersion Offset and Spatial Offset. The offsets are in units of fractional shutters. This option is useful when designing extra exposures with small spatial or dispersion offsets in custom MOS Observations designed without the use of the automatic MPT Planner. Designing entirely new MSA configurations from scratch is described later in this article.
Checking the Master Background button will allow the user to add extra shutters solely for the purpose of obtaining spectra that will be combined by the pipeline into a master background spectrum for background removal from source spectra. The Master Background button and its use are described in the section above on Adding Master Background shutters.
If desired, a new name can be given to the modified MSA configuration in the Configuration Name field. To confirm and accept this new MSA configuration, click the Save button at the bottom right of the MSA Configuration Editor window. This will produce a pop-up window as shown in Figure 6. Three options are provided: an option to save any changes made to the exposure + nod set (using the "Create" button), or to all shared instances of that named configuration within the observation ("Update" button), and a "Cancel" button to exit without any changes to the MSA Configuration. After making a selection, the MSA Configuration Editor will be closed and you will return to the view of the observation in APT, shown in Figure 1.
Designing a MOS Observation using custom MSA configurations designed from scratch
The MSA Configuration Editor also provides a means to create from scratch one or more MSA configurations at the observation level in APT, and to apply them directly to a MOS observation. In this workflow, the MSA Planning Tool is not needed. Custom MSA configurations can be manually designed from scratch with the MSA Configuration Editor using an MSA Catalog target from the Targets Folder, as described in the steps shown below. Like observations designed with MPT, observations designed in this way will follow a two-phase process whereby the observer will provide detailed program updates after an aperture position angle (APA) assignment is made by STScI.
A custom MSA configuration can be created with the MSA Configuration Editor following these steps:
In the Observation Folder:
- Create a new Observation in the Observation Folder of the Form editor.
In the Targets Folder:
- Create a Target. An MSA Catalog Target should be defined for the workflow we are describing here which uses a catalog to create slitlets on sources. Slitlets will almost always require an Aperture Position Angle assignment.
- For MOS observations using a Catalog, target acquisition with the MSATA methodology is usually required, especially for point sources. WATA is disabled when a Catalog target is chosen.
In the Observation Template:
- Give the Observation a Label. Select the NIRspec instrument, and NIRSpec MultiObject Spectroscopy Template.
- Select the Primary and an optional Filler Candidate list. The differences between these lists are more meaningful for automatically designed MOS observations using the MPT, which uses them to determine the best pointing, among other things. Nonetheless, they can be useful for creating custom configurations from scratch. If not, then simply select the parent Catalog as the primary sources and leave the filler candidate list undefined.
- Select a provisional Aperture PA (APA) for which you will design the example observations. (Unless a well-justified special requirement is included to constrain the APA, the APA will be assigned for planning the final program update.)
- The Science Aperture reference point is the MSA Center for a Catalog of sources in the MSA. This field will be greyed out to indicate that other options are not possible.
- Click the "Add" button below the "Exposure Specification" table to add a new entry.
- Define an Exposure Specification (Grating/Filter, Readout Pattern, Groups/Int, Integrations/Exp, etc.)
- Define additional exposure specifications, if desired. Note that there are buttons to "Duplicate", "Insert Above", and "Remove" exposure specifications in the table. There are also arrow buttons to the left of the table to move entries above or below other entries. To do this, an entry must first be highlighted by clicking the first column of an entry that you wish to move.
- Click the "Add" button below the "Configurations and Pointings" table to add a new entry to this lower table.
- Do not select a name for the MSA configuration from the pull-down in the column labeled MSA configuration at this time. One will be added when the configuration is designed in the pop-up MSA Configuration Editor.
- Select a Grating/Filter pair from the pull-down menu in the column marked "Exposure Specification". Only those grating-filter pairs that are specified in the Exposure Specification table are offered in the pull-down menu.
- If you intend to nod in the slitlets that you will be designing, specify a Nod Pattern from the pull-down menu. But keep in mind that the slitlets you design in the MSA Configuration Editor will need to be long enough to accommodate the nods that are specified here.
- Specify a Pointing for the center of the MSA.
- Leave the Dispersion Offset and Cross-dispersion Offset columns empty. These are here to make it possible to more easily create a set of dithered exposures all referenced to a single base pointing.
- Click the "Edit" button in the column labeled "Edit Config" to open the MSA Configuration Editor. At this point, the APT GUI should appear like that shown in Figure 7.
In the MSA Configuration Editor:
- Open shutters in the MSA Shutter View by clicking on them, as described in the section above on Manipulating shutters.
- When finished opening slits on sources, give the configuration a new Configuration Name in the pop-up MSA Configuration Editor. The name should be a unique name that allows its intended purpose to be easily identified.
- Make sure the Base Pointing (RA and Dec) is correct. The one present should be the reference position inherited from the MSA Catalog Target.
- Click "Save" to return to the Observation Level.
Back at the Observation Level in APT:
- Specify any remaining parameters that you may have skipped for this exposure, like the Nod Pattern. Selecting the 3-shutter nod pattern will create the exposures for the nods. The spatial offsets required for the nods will be automatically added.
- You may add other exposures for the observation in the Configurations/Pointings table or define a new grating/filter exposure in the Exposure Specification table. You can "Add", "Duplicate", "Insert Above", and "Remove" entries using the buttons below the tables. Note that the table displays a few additional columns: The Total Dithers (nods), Total Integrations, which is just the number of integrations in the Exposure Specification entry times the number of nods (in the Nod Pattern), and finally the Total Exposure Time for the exposure(s) on each line.
Karakla, D. et al. 2014, Proc. SPIE 9149
The NIRSpec MSA Planning Tool for multi-object spectroscopy with JWST