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.
The JWST General Target Visibility Tool (GTVT) is a Python command-line tool for calculating target visibility windows as a function of time. It's currently based on assumed pre-launch JWST orbital parameters. GTVT is one of two tools for investigating JWST target visibilities.
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 plot is displayed, icons can be selected to pan and zoom in on the plot to see detailed information.
The schedulability of a given target observation is more complex that 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.
The GTVT requires a few packages and libraries, all of which are included in the STScI AstroConda python distribution. These dependencies include NumPy, Matplotlib, and AstroPy. Therefore, to avoid problems, we recommend that you download and install AstroConda so that GTVT can be run in the AstroConda environment.
AstroConda runs from within the bash shell. If TCSH or CSH are your default shells, either change your terminal window to the bash shell (type "bash -l"
) before running the program, and/or consider changing your default shell to the bash shell.
Installation and usage
The GTVT is distributed as part of the AstroConda package from STScI. AstroConda is the preferred release channel for JWST Python-related tools. For more information, see the AstroConda installation instructions. Also note that AstroConda runs from the bash shell, not CSH or TCSH.
If you've already installed AstroConda for macOS or Linux, you can install GTVT as follows in the AstroConda environment:
(Command-line options for running GTVT are also available later in this page.)
When periodic GTVT updates are available, they can be obtained by simply installing it again, as shown above.
Alternatively, one can download a .zip file or clone the respository for GTVT from the following GitHub link
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
Also, if you are familiar with "pip", you can install the tool directly with
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 below.
To see the GTVT help information, type "jwst_gtvt -h".
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:
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 two limits shown.
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.
Alternatively, for viewing a single instrument, use the '--instrument' argument to specify an 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's plotted. Figure 2 shows an example made with the following command: