spacer link to MAST page spacer logo image spacer

gPhoton Data Cubes: Example Scripts and Results

Back To gPhoton Homepage

The Flare Star GJ 3685A

GJ 3685A is a flare star that underwent a double-flaring event while GALEX was observing. In this short exercise, we will create a data cube of this event using gMap, from which we can then create a movie. Below is the python script you will make.

import gPhoton

def main():
    gPhoton.gMap(band='NUV’, skypos=[176.91975, 0.25561], stepsz=30.,
         skyrange=[0.0333, 0.0333], cntfile='gj_3685a_count_movie.fits',
	 trange=[766525335.,766526573.])

if __name__ == '__main__':
    main()

In our call to gMap, we specify we would like to make an image cube, using the NUV data, via the "band" parameter. The central coordinate of our image cube is given in the "skypos" parameter. The "stepsz" parameter is set to make each frame of the data cube a 30-second coadd. We have decided to make an image cube consisting of counts, so we specify the output file name via the "cntfile" parameter. Note that you can also create calibrated intensity images as well, e.g., intfile='gj_3685a_intensity_movie.fits'.

The size of our image will be 0.0333 x 0.0333 degrees (2 x 2 arcmin), and is specified via the "skyrange" parameter. Important Note #1: gMap uses degrees for the image size.

If you were to create the above python script in a file called "myscript.py" and then executed it from the Unix command line as "python myscript.py", you will create a FITS file called "gj_3685a_count_movie.fits". To make a movie, you can open the FITS file in your favorite FITS viewer (for example, ds9). Most FITS viewers that can handle data cubes will also allow you to blink between frames in a data cube. After adjusting color bars, scaling intensities, etc. to your liking, you can then blink through all frames of your data cube and record that part of the screen using any screen grabbing software. For the movie shown below, ds9 was used to open the data cube, adjust the color bars and flux scalings, and loop through each frame, while QuickTime was used to record the part of the screen showing ds9 and save it to a movie (.mov) file.

Back To Top