Sky Subtraction, Flat Fielding and Trimming with PHXPROC

Whew! Seems like a lot of work so far, with nothing to show for it. That's about to change; you're now going to reap major benefits from your hard work. Enter the task phxproc. It will take your data frames, subtract adjacent frames to remove sky emission, flat field the data with your flat field frame, and trim all images to eliminate unilluminated rows of the array... all in one swell foop.

epar phxproc

phxproc parameters screenshot
Click here for text parameters

phxproc is pretty self-explanatory... just provide your list of images, prefixed with the @ symbol, your flat field frame, and the section of the image to trim (in this case, chop off the lowest 16 rows). The only nuance is the bgtype parameter, which defines how the sky is subtracted:

bgtype parameter Sky subtraction behavior
norm This is default. It assumes that adjacent frames may be subtracted from one another, i.e. A-B-A-B.... In fact, BOTH adjacent sky frames will be averaged together and then subtracted! Assumes that you are wobbling along the slit, so there is data AND sky in every frame.
alt Alternate frames contain data, separate sky frames are interleaved. This is necessary for large extended sources that prohibit wobbling along the slit.
alt2 Similar to alt, except that there are two consecutive on-source frames for every sky frame... i.e. A-B-B-A-B-B-(etc.). This increases observing efficiency for large extended sources that prohibit wobbling along the slit. As the quality of the sky subtraction suffers, it should only be used during relatively stable conditions, and at J-K bands.

All set? Okay, hit :g and let phxproc crunch away on your data. When you are done, your processed files will have a .r attached to the filename (i.e. data001.fits becomes data001.r.fits) and you can look at them using display or all at once using mdisp.

Below is a sample of a single sky-subtracted, flat-fielded, and trimmed image... the same image as the raw one we saw earlier. Doesn't it look so much better? The second image is a 1:1 zoom on the center of the array. Notice that numerous warm pixels have not subtracted out. They will have to be masked or otherwise rejected, or they will compromise the integrity of the data. More on this soon...

sky subtracted image, zoom=50% sky subtracted image, zoom=100%

go back Selecting Files for Bulk Processing go Home Reduction Home Combining images go
	forward


Craig Kulesa
Last modified: Sat Jul 21 01:24:27 MST 2001