JWST General Target Visibility Tool Help

The JWST General Target Visibility Tool (GTVT) is a command-line Python tool that provides quick-look assessments of target visibilities and position angles for all JWST instruments.

On this page

See also: JWST Moving Target Visibility Tool Help, JWST Position Angles, Ranges, and Offsets, JWST Observatory Coordinate System and Field of Regard

The JWST General Target Visibility Tool (GTVT) is a Python command-line tool for calculating target visibility windows as a function of time. GTVT is one of 2 primary tools for investigating JWST target visibilities. The  assumed orbital ephemeris and default time period over which the calculations run are sufficient to accommodate the expected launch date of JWST and the duration of Cycle 1.

For a given RA and Dec, the GTVT provides the reference position angle (PA) information for all 4 science instruments and the FGS within the allowed visibility windows. It also outputs the V3 axis PA for reference. Results are in the form of an ASCII file as well as one or more summary plots. A number of options are available from the command line for tailoring the output to your needs. Once the interactive plot is displayed, icons can be selected to pan and zoom in on the plot to see detailed information.

The GTVT contains an optional branch that permits the easy inclusion of moving targets instead of just fixed coordinate targets. See JWST Moving Target Visibility Tool Help for more information on this option.

The schedulability of a given target observation is more complex than just its visibility. It also involves the availability of guide stars as a function of time and other constraints that may be set with special requirements in APT. The GTVT is a "quick look" tool for pre-planning purposes, but the Astronomers Proposal Tool is the true arbiter of schedulability for a given proposed observation.

By default, the GTVT calculates the full visibility windows for a given input target.  If one decides to limit the allowed background levels for a given observation, this will impact the scheduling windows.  With the GTVT, one can easily assess how much of the visibility window is lost for a given assumption about the background.



Dependencies

Words in bold italics are also buttons 
or parameters in GUI tools. Bold 
style represents GUI menus/
panels & data software packages.

The GTVT requires a few Python packages and libraries. These dependencies include NumPy, Matplotlib, Astropy, Astroquery, and pysiaf.  Use the

pip install [PACKAGE]

command (where PACKAGE is one of the dependencies listed above) to assess whether it is installed.  If not already installed, the pip command will do so.



Installation and usage

GTVT 0.2.0 is the most recent release (July 2021). It is compatible with Python 3.7 and up.

The GTVT is currently incompatible with Windows operating systems.

One can download a .zip file or clone the repository for GTVT from the following GitHub link:

https://github.com/spacetelescope/jwst_gtvt

and install the tool inside the resulting jwst_gtvt-master directory (you should see a file called setup.py in this directory) with the command 

python setup.py install


Alternatively, if you are familiar with pip, you can install the tool directly with

pip install git+https://github.com/spacetelescope/jwst_gtvt.git

These options assume you have separately verified that your computer has access to the dependencies listed above. Once successfully installed, the program can be run from the command line, as described in the next section.



Usage tips

To see the GTVT help information, type jwst_gtvt -h.

$ jwst_gtvt [-h] [--v3pa V3PA] [--save_plot SAVE_PLOT]
                 [--save_table SAVE_TABLE] [--instrument INSTRUMENT]
                 [--name NAME] [--start_date START_DATE] [--end_date END_DATE]
                 [--bkg_cutoff] [--no_verbose]
                 ra dec

positional arguments:
  ra                    Right Ascension of target in either sexagesimal
                        (hh:mm:ss.s) or degrees.
  dec                   Declination of target in either sexagesimal
                        (dd:mm:ss.s) or degrees.

optional arguments:
  -h, --help            show this help message and exit
  --v3pa V3PA           Specify a desired V3 (telescope frame) Position Angle.
  --save_plot SAVE_PLOT
                        Path of file to save plot output.
  --save_table SAVE_TABLE
                        Path of file to save table output.
  --instrument INSTRUMENT
                        If specified plot shows only windows for this
                        instrument. Options: nircam, nirspec, niriss, miri,
                        fgs, v3 (case insensitive).
  --name NAME           Target Name to appear on plots. Names with space
                        should use double quotes e.g. "NGC 6240".
  --start_date START_DATE
                        Start date for visibility search in yyyy-mm-dd format.
                        Earliest available is 2020-01-01.
  --end_date END_DATE   End date for visibility search in yyyy-mm-dd format.
                        Latest available is 2023-12-31.
  --bkg_cutoff			Enter decimal value between 0.1 and 1.0 to limit the 
						percentile of the maximum background level to allow.
  --no_verbose          Suppress table output to screen



GTVT command line examples

When using GTVT in the command line, you only need to specify RA and Dec (the default input values). Observability windows are shown on the terminal, and plots of visibility windows for each instrument are displayed. However, there are other useful command-line options, as shown in the examples below; each command is followed by a text description.


jwst_gtvt 325.678 43.586 --name "SS Cyg"

This command runs and produces an interactive visibility plot on the screen for all instruments. No files are saved to disk. Note that enclosing the target name in double quotes allows for spaces in the text. To exit the program, close the plot window. Alternatively, if you want access to the terminal window from which the tool was run prior to exiting the program, add an ampersand "&" at the end of the command-line entry above to run the program in the background.


jwst_gtvt 325.678 43.586 --name "SS Cyg" --save_plot SSCyg_all.png

This command only saves a plot to a file; no interactive plot is displayed.


jwst_gtvt 325.678 43.586 --name "SS Cyg" --instrument v3 --save_plot SSCyg_v3.png

This command shows a single instrument panel for (in this case) the V3PA. The allowed values for --instrument are "nircam", "nirspec", "niriss", "miri", "fgs", and "v3" (case insensitive). To exit the program, close the plot window.


jwst_gtvt 325.678 43.586 --name "SS Cyg" --save_table SSCyg.dat

The command produces a plot on the screen for all 6 instruments. Tabular data are sent to a file instead of being displayed on the screen. To exit the program, close the plot window.


jwst_gtvt 325.678 43.586 --name "SS Cyg" --save_plot SSCyg_all.jpg --save_table SSCyg1.dat

This command saves both outputs to the specified files; there is no interactive plot.

jwst_gtvt 325.678 43.586 --name "SS Cyg" --start_date 2020-06-01 --end_date 2021-05-30

An interactive plot is displayed for all 6 instruments, starting at June 1, 2020 and running for one year. To exit the program, close the plot window.


jwst_gtvt 325.678 43.586 --name "SS Cyg" --bkg_cutoff 0.1

This example shows how the visibility windows are impacted when the background level is limited to lie below the 10th-percentile of the maximum background level at the target position.  The impacts are noted on the resulting plots.

The example below shows the top portion of an ASCII output file from a simple run of GTVT. The top section provides a summary of the target and windows, and the bottom table (truncated) shows the day-by-day minimum and maximum allowed angles in each of the visibility windows for each instrument. The nominal angles are approximately midway between the 2 limits shown.

                ecliptic
RA      Dec     latitude
325.678  43.586  52.656

Checked interval [2019-06-01, 2019-12-30]
|           Window [days]                 |    Normal V3 PA [deg]    |
   Start          End         Duration Start         End          RA             Dec
 2019-06-02 2019-12-21 201.93     244.06365  50.05444 325.67800  43.58600 

             V3PA           NIRCam           NIRSpec        NIRISS           MIRI              FGS
 Date         min    max      min    max       min    max     min    max      min    max      min    max

2019-06-03   240.63 247.46   240.60 247.44    18.11  24.95   240.06 246.89   245.64 252.48   239.38 246.21
2019-06-04   239.50 247.06   239.47 247.03    16.99  24.54   238.93 246.49   244.51 252.07   238.25 245.80
2019-06-05   238.37 246.65   238.34 246.63    15.86  24.14   237.80 246.08   243.39 251.67   237.12 245.40
2019-06-06   237.24 246.25   237.22 246.22    14.73  23.74   236.67 245.68   242.26 251.26   235.99 245.00
2019-06-07   236.12 245.85   236.09 245.82    13.61  23.34   235.55 245.28   241.13 250.86   234.87 244.60
2019-06-08   235.12 245.33   235.09 245.30    12.61  22.81   234.55 244.76   240.13 250.34   233.87 244.08
2019-06-09   234.36 244.56   234.33 244.54    11.85  22.05   233.79 243.99   239.37 249.58   233.11 243.31
2019-06-10   233.60 243.80   233.57 243.77    11.09  21.29   233.03 243.23   238.61 248.82   232.35 242.55
2019-06-11   232.84 243.04   232.81 243.01    10.33  20.53   232.27 242.47   237.85 248.05   231.59 241.79

...(full table truncated)



Example plots from GTVT

By default, a plot showing 6 panels (one for each instrument, the FGS, and the observatory V3PA) will be displayed by GTVT on the screen or sent to a named output file. The y-axis of each plot shows valid aperture PAs for each instrument as a function of time. These values can be entered into the relevant APT special requirements as needed for a given science case.

Figure 1. The default 6-panel GTVT output plot

Note that over time, a large range of potential position angles are available for this target, which is at ecliptic latitude 52.6°, and the pattern repeats closely from one year to the next.

This summary plot may not be that useful when saved as a file. But in interactive mode, icons at the lower left of the plot window allow you to pan and zoom within each panel for a closer look at the figures. After panning and zooming in the interactive plot, the right-most icon provides another way to save the current view of the interactive plot.

Alternatively, for viewing a single instrument, use the --instrument argument to specify a particular instrument; this produces a display with a single panel plot for that instrument. Also, the time range on the default plot covers the entire current period with a preliminary orbital ephemeris. You can also use the --start_date and --end_date arguments to shorten the time range that is plotted. Figure 2 shows an example made with the following command:

jwst_gtvt 325.678 43.586 --name "SS Cyg" --instrument nirspec --start_date 2020-06-01 --end_date 2021-01-01

Figure 2. A GTVT plot for a single instrument and a restricted time range

This target is at an ecliptic latitude of 52.6° and has a single, long visibility period between the chosen dates. A wide range of position angles are available for such a target.

Figure 3 is a similar plot for an assumed target near the ecliptic plane (in this example, the ecliptic latitude is only 16.3°). Note how the available angles are restricted to 2 narrow ranges near 20° and 200°, and there are large ranges of position angles that are unavailable at any time for this target due to the JWST observatory constraints.

Figure 3. A target position at ecliptic latitude of only 16.3°

Note that while there are 2 visibility periods for this target between the chosen dates, the allowed position angles (near 20o and 200o) are severely limited. Certain position angles are simply not observable for a target such as this.
Figure 4. A an output example where the allowed background was limited to the 10th percentile of the maximum

An example of visibility being constrained by the allowed background level.  In this example, restricting the background has no impact on one of the visibility windows but significantly shortens the second one.
Additional information on JWST’s pointing restrictions, and how those affect target visibility and available position angles are included in the article JWST Position Angles, Ranges, and Offsets

 


Latest updates
  •  
    Updated for version 0.2.0.


  • Removed language about specific launch date and made generic.

  •   
    Added a note about incompatibility with Windows.


  • Removed "conda install" instructions for the time being.

  •  
    Comment added regarding updated ephemeris.

  •  
    Added a note and link regarding the moving target option of GTVT.
Originally published