modsDisp - MODS Raw Data Display Tool

modsDisp is a program that launches two (later 4) dedicated ds9 tools for displaying raw MODS images.

Starting and Stopping modsDisp

To start modsDisp, you need to be logged into one of the partner observing accounts on one of the observing machines (e.g., obs2, obs3, or obs4).

Open a terminal window and at the shell prompt, type
This will launch two ds9 windows labeled "MODS1Blue" and "MODS1Red" (if they are not already running), and resize them to an 800x800 pixel display window. It will then load the last images that were written to the /newdata archive disk if they are still present.

To end the session, type "Ctrl+C" in the terminal window where you launched modsDisp. This will stop the disk watcher, but leave the ds9 windows alive. You can kill each ds9 window with their GUI controls.

If you restart modsDisp while the ds9 windows are still up, it will resume using those windows.

Using modsDisp

A each new MODS FITS format image is copied from the MODS data handling machine to the /newdata staging disk on the archive computer, it will be displayed on the ds9 display for that channel in within 1-2 seconds.

The incoming images are listed in the terminal window you used to launch modsDisp as they arrived on the archive staging disk, along with basic FITS header information to help you track which images are available for further examination.

Images are displayed with a black-and-white color map and using the linear zscaling algorithm. This works well for most direct images and spectra. However, some comparison lamp spectra have a mix of very bright and very faint lines, and you may want to use a less aggressive scaling like linear minmax to see the brighter lines.

You can change the display scale, zoom, and pan in between displays, and launch the built-in ds9 analysis tools (plots, contours, etc.), but the next image will interrupt those activities, and on each new image displayed, the zoom, color, and intensity scaling are reset to the common mode (i.e., zoom-to-fit, black-and-white color, and linear zscale).

New images are not listed in the modsDisp monitor window until after the files have been written and closed. This should prevent you from crashing programs by trying to read images still being written. At this point they are ready to be copied into a writable work space for examination with IRAF, IDL, or your favorite image analysis package.


Only one instance of modsDisp may be run at a time on a single machine for a single user (e.g., LBTB user on obs2).

However, another user (or even the same user) on a different machine can run another instance (e.g., a support astronomer logged in as LBTO on obs4).

Be aware, however, that we have only tested this with two simultaneous instances on two different machines, so they probably cannot be multiplied indefinitely.


Executable Files and Requirements

The current public version of modsDisp is in /home/MODSeng/bin. Include this in your default shell path to be able to run this and all the other MODS programs. The python script it calls is in /home/MODSeng/pyMODS.

It requires ds9 v6.x and xpa v2.1 or later for the displays and display command pipes. requires the pyds9 and PyFITS python modules.

How it Works

modsDisp is a shell script that launches named standalone ds9 windows (if they are not already running) and then launches the python script. This script does all the work: it watches the /newdata staging directory for changes in the and files written there by the MODS data-handling system. These files contain the names of the most recent raw FITS images written to the archive staging disk. When these files change are seen to change, reads the files and uses pyds9 and pyFITS methods to display the new images and print basic FITS header information on the terminal screen. only checks the staging disk for new images every 2 seconds, so if the images are written near the end of an update cycle, there could be as much as a 2-second delay until the new images are displayed.

IRAF Interaction

Simply put, there is none. The modsDisp ds9 windows are opened to be standalone with no IRAF imtool pipes attached (to be specific, we start the ds9 windows with ds9 -fifo none -port none -unix none -title ...). This prevents IRAF (which does not like to share displays with others) from interrupting the raw data display. If you want to examine the raw images with IRAF, we suggest you open IRAF on another workstation with its own ds9 display and work with the data separately.

-- RichardPogge - 10 Aug 2011
Topic revision: r2 - 11 Aug 2011, RichardPogge
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback