Version 0.3.2  

Evt2img: A demo that uses the SLgtk and histogram modules


evt2img is a simple interactive program that produces either a PNG or JPEG true-color (RGB) image from a Chandra X-ray Observatory event file. It was was put together in relatively little time to illustrate the power and flexibility of the S-Lang histogram and SLgtk modules. The script may be found in the examples directory of the histogram module distribution.

evt2img creates the image by filtering the data in the selected energy bands and then bins the selected events using the hist2d function to create RGB images for the corresponding bands. The resulting image is displayed with the help of the SLgtk module.

One of the most useful features of the program is the ability to plot the energy spectrum of the events and use it to adjust the energy bands. The script creates the energy spectrum using the histogram module's hist1d function.

As a concrete example, consider the Chandra X-ray Observatory observation of the supernova remnant E0102-72 (obsid 120). Feeding the level-2 event file (acisf00120N001_evt2.fits) to evt2img produces:

Figure showing the display window

As figure shows, one may pan around (by clicking to center the image) and zoom in and out, and set various scaling properties by clicking on the corresponding buttons. Note that the above image contains a fair amount of high energy background noise as is evidenced by the number of blue background pixels. These may be removed from the image by adjusting the energy bands that define the RGB levels. Clicking on the "Adjust RGB Levels" button brings up the RGB selection widget:

Figure showing the RGB selection widget

This widget shows a plot of the color-coded energy spectrum of the events making up the image and various sliders to adjust the color levels. Moving the upper limit blue slider down to about 7 keV and the clicking on the "Equalize" button produces:

Figure showing the updated levels

Assuming that these are the desired levels, click the "Ok" button to close this dialog and recreate the image using the new levels:

Figure showing the updated image

Finally, the image may be saved to either a JPEG or PNG by clicking on the "Save" button:

Figure show save dialog window

This page was last updated Dec 2, 2007 by John E. Davis. To comment on it or the material presented here, send email to davis at space mit edu.
Valid HTML 4.01! Made with JED Viewable With Any Browser