NIRSpec MPT - Computational Performance

On this page

Parameters affecting the performance of MPT

The NIRSpec MSA Planning Tool (MPT) operates by creating a grid of test pointings at which it will attempt to optimally fill the MSA shutters with sources. The search grid of test pointings is defined by a center, width, height, and step size. It then finds the pointing or pointings that can observe the most sources, or the most highly weighted sources, if weights are used. If dithers are included, MPT will attempt to maximize the number of sources observed at all dither positions. To do this, MPT must transform the source coordinates from the sky to the MSA plane to identify the appropriate shutters and vet the shutter operability and availability at each test pointing.

If your catalog (or Primary and Filler Candidate Lists*) is dense and very large in extent, it may be impractical to run MPT using the default search area in the MPT Planner, which is the entire extent of the catalog (see Figure 1). A more typical density catalog like the HUDF, which nearly matches the MSA footprint (3.4' × 3.6'), has ~10K sources (a source density of ~800 sources /arcmin2) and is considered only moderately dense. Even for this catalog, probing a search area the size of the catalog with small step size (< ~1") will be prohibitive because the runtime would be costly. Larger, denser catalogs with a finely-spaced search grid may also exceed the memory allocation reserved for APT (about 4.5 GB), in which case the MPT plan will not complete successfully. Furthermore, there is often little to be gained in probing dense catalogs at finer step sizes because finding sources to fill the MSA (without spectral overlap) is usually not the problem. Unless the source distribution is uneven, the MSA multiplexing is already maximized at coarser step sizes for dense catalogs. 

The memory use and runtimes in MPT are interwoven. Even for the same catalog, the memory allocated for the calculations is adapted to the search grid spacing. If needed, APT will allocate more memory at the expense of additional runtime. The parameters that most affect the performance are the number of sources in the catalog, and the number of test pointings in the search grid (which in turn depends on the area of the search grid, and the spacing of the search grid points). The number of catalogs loaded, and the number of observations in the APT file also contribute to the memory demands on MPT/APT. It is best to work from one (complete) catalog from which different (Primary and/or FillerCandidate Lists can be derived for making MOS observation plans, and ultimately, MOS observations.

MOS observers using MPT should first ensure they have an available memory of at least 4.5 GB in order to successfully complete their plans and make observations in APT.

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.

Figure 1.  MPT search grid parameters

The MPT Planner showing the catalog size and the Search Grid parameters and values for MPT. Default values are calculated automatically. The plan runtime is impacted most by these parameters. The Width and Height are derived from the Catalog extent in the dispersion and spatial directions. The search grid Center is the median center of the catalog in each direction. The Search Step Size default is 30.0", which is usually a good starting value that should run quickly for most catalogs. These parameters are used to create a grid of test pointings where MPT will attempt to create an optimal MSA Configuration (or set of configurations if dithers are specified). This is done by maximizing the number of sources that can be observed at once, or the total weight of all observed sources, if the Use Weights checkbox is also checked in MPT. In the example above, there are no Fixed Dithers, hence just one MSA configuration will be generated.


Comparison tests

To provide some quantitative comparisons, several tests were performed with the APT 2020.4.1, the version of APT which is to be used for cycle 1 proposal submission. The tests were run with two catalogs of different density and size: the moderately dense WFC3 UVUDF catalog of Rafelski (2015) and the much more crowded and larger area ACS catalog of Omega Cen of Anderson and van der Marel (2010). We used a portion of the entire Omega Cen catalog that was about 5.7' × 7.0'. This section of the catalog covers an area similar to what is expected from NIRCam pre-imaging. Table 1 presents the comparative results of our tests. The tests were run on a MacBook Pro (2.8 GHz Intel Core i7) with 16 GB of memory (~5 GB available) and 16 cores. The runtimes are representative. Your runtimes may be different depending on what other applications are running on your computer, and your computer's processor speed.

For reference, we have found that for the UVUDF catalog, one pointing (no dithers), with a search grid that covers the entire catalog area and a step size of 0.5", the plan completed successfully in about 4.7 hours (line 5, Table 1). This step size is equivalent to about twice the shutter pitch in dispersion, or about two shutter widths. This runtime is probably a practical limit for most observers.

When preparing the final MOS program updates with catalogs of sparse to moderate density like the UVUDF and HUDF (<~ 800 sources/arcmin2), it is often advisable to explore even smaller step sizes (e.g., sub-shutter step sizes of 0.1" or 0.15") to have the most success in finding an optimal pointing or set of pointings with MPT. However, using a sub-shutter step size even for the UVUDF catalog area would be impractical because of the runtime. Depending on the number of sources in the catalog, and how large an area it covers, planning may require reducing the search area (Width and Height) accordingly to lower the runtime and stay within the memory limit that has been allocated by the APT application. A simple strategy for doing so is presented in the next section. For very dense crowded fields, there is often no significant gain in probing to very small step sizes, as mentioned above. (Although, the observer should be aware that MSATA may not be possible if sufficiently isolated sources cannot be found.) Also, this level of effort is not warranted for proposal submission in most cases. At program update, however, and using the assigned aperture position angle (Assigned APA), it makes sense to try to optimize results as much as possible.

In another example, the Omega Cen catalog has ~86,000 sources covering an area of about 5.7' × 7.0' (40 arcmin2). The average source density in this field is about 2,150 /arcmin2. We ran some tests with 3 dither positions (2 dithers plus the primary pointing), and a step size of 3", constituting nearly 29K test pointings, and the test took 9.8 hours to complete (line 4 in Table 1). The same catalog and the same planning parameters took just 33 minutes with a coarser step size of 10" (line 2 in the table), scaling roughly as the number of pointings.


Table 1. MPT Performance Tests

Catalog (#sources)Search grid areaSearch step sizeNumber of pointings

Dither points or configurations

Runtime
UVUDF (9969)entire catalog ~3.4' × 3.4'10"841382 s (1.4 m)
Omega Cen (86468)entire catalog ~5.7' × 7.0'10"269531986 s (33.1 m)
UVUDF (9969)entire catalog ~3.4' × 3.4'3"84643703 s (11.7 m)
Omega Cen (86468)entire catalog ~5.7' × 7.0'3"28,980335295 s (9.8 h)
UVUDF (9969)entire catalog ~3.4' × 3.4'0.5"294,306116768 s (4.7 h)
UVUDF (9969)20" × 20"0.5"16811249 s (4.1 m)
Omega Cen (86468)20" × 20"0.5"16811869 s (14.5 m)



Alternative planning strategy for large area catalogs

See Also: NIRSpec MOS Recommended StrategiesNIRSpec MPT PlannerNIRSpec MPT - Parameter Space

As indicated above, observers may find improved multiplexing results using a fine (even sub-shutter) Search Step Size, especially for sparse to moderately dense catalogs. But because of the prohibitive runtimes when using the default area (the entire catalog), the best way to probe for an optimal pointing solution in MPT using a very small Search Step Size is in 2 stages:

  1.  First, find a preferable location for your MSA pointing(s) by running MPT with a coarse step size over the entire area of your catalog (the default values of Width and Height). Include any dithers that you want to use. Adjust the Search Step Size to keep the number of pointings in this step below ~3,000 for a source catalog of about 10,000 sources. Try the smallest step size you can without exceeding the time you want to wait for your plan to finish. For catalogs that cover an area much bigger than a few times the MSA, you can save a little time by trimming the search width and height by about one MSA in width and height (so, by about 3.5 arcminutes in each dimension). The best pointing will be the one that maximizes the number of sources or highly-weighted sources if weights are used.  That usually means that pointings near the edge of the field are rarely preferred because a portion of the MSA will be empty, unless the source distribution of your Primary Candidate List is highly asymmetric.

    When the plan finishes, MPT will have found a preferred pointing (or a set of pointings if Fixed Dithers were specified).

  2. For the next plan, use the first dither pointing (in the first science exposure) of the plan from stage 1 as the Center of your new search grid for stage 2. Use the MPT Planner once again to define a search grid centered at that preferred pointing (with the same Fixed Dithers as in stage 1) and reduce the extent of the search grid (Width and Height) to accommodate a sub-shutter Search Step Size (~0.1" to 0.2") , so that the number of test pointings (the number reported to the right of the Search Step Size field) is below a few thousand. If your catalog has more than about 25,000 sources, then you may need to reduce the search area width and height even further. As indicated above, the memory used by MPT and its runtime depend sensitively on the catalog size (number of sources), and the number of test pointings in the search grid.  The number of test pointings depends on these MPT parameters: Search Step Size, and the extent of the search grid (Width and Height). The article NIRSpec MPT - Parameter Space gives the user some idea of the interplay between the different parameter values, and the success of different observing strategies (in terms of the number of sources observed).


References

Anderson, J & van der Marel, R. 2010, ApJ 710, 1032 
New limits on an intermediate-mass black hole in Omega Centauri. I. Hubble Space Telescope photometry and proper motions

Rafelski, M., Teplitz, H.I., Gardner, J.P., et. al 2015, AJ Vol 150, 1
UVUDF: ultraviolet through near-infrared catalog and photometric redshifts of galaxies in the Hubble Ultra Deep Field.




Published

 

Latest updates