IDP3

These instructions will be in the form of a tutorial on this main page, with details about each pop-up widget on separate pages which can also be accessed with the sidebar.

On this page:

Special SPITZER Features

IDP3 stands for Image Display Paradigm #3.It is a very useful tool for image manipulation, especially for single sources. This is software supported primarily by the NICMOS IDT. It was designed with the following goals in mind:


Setting Up

Before you begin, you will need to download the program and some libraries. All of this is explained in detail in IDP3 Set up. A file with 14 images you can download and play with is source.tar.gz. (You will have to unzip and untar this directory.) Edit the source.lst file so that it include the entire path to the rest of the source*.fits files.
Or, if you have the SPITZER version of IDP3, you can use the multi-extension form: source_mips.fits. Load this using "Load MIPS". If you DON'T have the SPITZER version, this file will not work for you.

To start the program, invoke IDL. If you are not already there and you don't have the path set, you will need be in the idp3 directory.

To start the fun, simply type:
idp3

To pre-compile all the modules usded by idp3, and perhaps save time later you can run the procedure doidp3.


Starting

You should now have a blank Main Display Window on your screen. Click on File/Load Image and then select source1_1_3exp.fits. This should display an image of a star field in the lower left corner of the Main Display Window, and the Show Images Window will also appear. Go to File/Load Image again and load source1_2_3exp.fits, and so on. The names should be added to the Show Images Window as well.

-OR-

You can also load several images at once by making a file that is a list of the image names. Name this file with the suffix ".lst". (This suffix can be changed in File/Edit Preferences on the Main Display Window.) Load all of the images using the File/Load List option from the Main Display Window. There should already be a list for these files called "source.lst". You will need to change the paths to be for your computer.

Try turning each image on and off by clicking on the "On" toggle to the right of the image name on the Show Images Window. You can also flip the y-axis by selecting "Flip Y". --End with all images on and not flipped.


Adjust Display

On the Main Display Window choose the option Adjust/Display to get the Adjust Display Window. Here you can control a number of features involving how the display looks:

The XLoadct Widget lets you control the color and look of your images in much greater detail. "Tables" gives you a list of color schemes to choose from. "Options", among other things, lets you reverse the color scheme, replace the original table, or restore the original settings. "Function" gives you control of the transfer function.

NOTE! Before you change colors with the XLoadct Widget, you should turn off the already selected colors so they don't conflict and confuse. To do this, go to File/Set Colors on the Main Display and hit Reset to set all of the choices to "None".


ROI

To select a Region of Interest left-click and drag to create a box in the Main Display Window. For further demonstration, be sure to select all of the area that shows the star field. The Region of Interest widget should appear with the selected region showing.

Go to the Zoom Menu and select "2" or "4", depending on how big your monitor is. The roi image is now bigger for your viewing pleasure.

Those quick of eye might have noticed that the stars in each image form similar patterns, but they are offset. To see if the stars do overlap in the World Coordinate System, in the ROI window select Plot/Align by WCS. And voila! (This can also be done from the Images/Align by WCS menu on the Main Display Window.)

You might want to go back to the Main Display Window and reselect a larger ROI, now that some of the images have moved.


ROI-Radial Profile

**Note** If you used an earlier version of idp3, the three mouse buttons were used to invoke different modes of use. This is now taken care of by clicking on the button next to the mode you would like.

Let's first try the Radial Profile Mode. Click on the button to the left of the words "Radial Profile." Click in the center of a star in the ROI window and drag out, creating a circle that surrounds the star. A Radial Profile Widget will now appear.

The information that is automatically there includes the coordinates and the radius of the circle you drew. (XCenter, YCenter, Radius)
To calculate the Full Width Half Max (FWHM) of what's in your circle, click the button "Calc FWHM".
To center the circle on the center of the star, click Centroid. This will change the XCenter and YCenter, but not the radius. It will also automatically redraw the plot and recalculate the radial profile with the new center. Click on Calc FWHM again to get a more accurate reading.

This window can also plot the Encircled Energy by clicking to the left of these words on the Radial Profile Widget. The enclosed energy vs. the radius will now be plotted on the graph.


ReAligning by Centroids

To align the images more accurately, you can use the "Align by Centroids" method. Just follow these three easy steps:

  1. Align by WCS (with Images/Align by WCS on the Main Display Window or Plot/Align by WCS on the ROI Window.)
  2. Turn off all of the images except the Reference Image. Use the Radial Profile to get a Centroid as described above in the Radial Profile section.
  3. Turn all of the images back on and use Plot/ReAlign by Centroids on the ROI Window.

This works most effectively if the Align by WCS is correct to within one pixel.


Aperture Photometry

To do aperture photometry, the first thing to do is get a radial profile of a star. As above, draw a circle around a star in the ROI window while the mouse is in Radial Profile mode. After the Radial Profile widget pops up, Calc FWHM and Centroid.

On the ROI Window, go to Plot/Aperture Photometry. The Aperture Photometry Window has now appeared. Update the center coordinates of the centroid.

To get the needed radii, look at the graph of the Radial Profile as well as the ROI. The Target Radius should be the smallest, located just outside the Airy Ring. The inner and outer radii will form an annulus of pure background. So the inner should be out a bit from the Target Radius, and the outer should be still larger than that.

Now hit the Compute button, and the fluxes, number of pixels, medians, and RMS errors will be displayed for the Target, the Target without the background, and the Background. The Target numbers refer to the area inside the target radius. The background comes from the area between the inner and outer radii.

For more details, see the Aperture Photometry Page.


ROI -Cross Section

The Cross Section tool lets the user see the intensity variation across a given object. To use this click on the Cross Section button on the ROI window. Click and drag a line across a star in the ROI. When you release the mouse button, the Cross Section Widget will appear with a graph of Intensity vs. Pixels.

Now click the Calc FWHM button and the values for the Full Width Half Max, the x and y values of the peak, and the Baseline Value appear at the bottom of the widget.

To fit the profile, choose from Full (fits a gaussian to both sides), Left (fits a gaussian to symmetrical data, replacing the right side with the left side), or Right (fits a guassian to symmetrical data replacing the left side with the right side). The values for Full Width Half Max, the x and y values of the peak, and the Baseline Value for the fit will appear at the bottom right.


Subtracting a Point Source

Subtracting a point source can sometimes be useful. For example, you could subtract off the star in order to see a disk around it. To do this, first of all you need a point source:psf.fits (Shift-click to download.)

Load this image from the Main Display Window File/Load Image. Go to the Show Images Window and make this the Reference.

If you can't see the point source, it is because it's flux is much less than the rest of the images. To get an idea of the pixel values, run the cursor over a star in the ROI (or on the Main Display Window). The line at the bottom of this window gives you the x and y coordinates, the pixel value, and the zoom amount. Now turn all of the images off except for the point source. Put the cursor on the point source in the ROI to see its value.

On the Main Display Window, go to Adjust/Position. The name of the point source file should be at the top of the Adjust Position widget. The next line is the "Flux Scale." This will increase the flux of the Reference image by whatever factor is in the box. To get the point source flux to be about the same as the rest of the images, the Flux Scale should be about (Pixel value of a star/Pixel value of the point source).

Once you can see the point source, you can now line it up. The elongated group of bright sources, about coordinates (85,110), is actually a simulated star with a disk. So if you subtract of the star, you will be able to see the features of the disk more clearly. There are two ways to line up the point source with the star.

The first way is to use the arrows to line up the point source and the center of the star. You can adjust the step size with the "Move Amount". After you have gotten it fairly close by eye, use Realign by Centroids to line it up more accurately.

Align by Centroids

The other way to line them up is to use Align by Centroids from the ROI Plot Menu. There are several steps to this process:

  1. Turn off all of the images except for one star image. Make this the Reference Image by clicking on its name in the Show Images Window.
  2. Use the Radial Profile Mode in the ROI Window to draw a circle around this star. Calc FWHM and Centroid until the FWHM stops changing.
  3. Turn off the star image and turn on the point source image.
  4. Now use the Radial Profile Mode in the ROI Window to draw a circle aroundthe point souce. Calc FWHM and Centroid until the FWHM stops changing.
  5. Turn the star that is the Reference Image back on, leaving the point source on as well.
  6. Then use Plot/Align by Centroids from the ROI Window.
  7. You can now turn the rest of the star images on.

For the subtracting part: On the Adjust Position Window, put in a negative value for the "Flux Scale". Change this as needed to remove the star. You can also do it by steps with the +/- buttons and a value of the step next to them. This will automatically change the "Flux Scale".

Go the the ROI Window and select the Cross Section mode. Draw a line across the disk and star. You can see the profile change as you change the Flux Scale.


Sigma Clipping

You can take the mean or median value of each x/y coordinate, clip off any outliers, and save the results to a new fits file. Unlike the "Ave" on the Show Image Window, it only takes into account how many images contribute to that particular point, not how many images are turned on.

On the Main Display Window, choose Images/Sigma Clipped Median. You can now type the name of what you want this file called and hit Return. This might take a few seconds. This function seems very good at taking off any cosmic rays or bad pixels.

If you would rather have the mean values, choose Images/Sigma Clipped Mean.

You can now load these files to see the results.

To change how much is clipped off, on the Main Display Window go to File/Edit Preferences and change the "Clipping Limits".


Blink

The Blink feature is very useful in helping you see the differences between images and finding objects (such as cosmic rays) that appear in only one image.

First go the the Blink/Setup on the Main Display Window. The Blink Control Parameters widget will appear.
Blink Frame Delay controls the time between frames (in seconds). The frame might be show for longer than this, if rendering takes some time. For now try 0.2500.
Blink Series Delay controls the length of the pause after all the images have been displayed. Try 1.00
Blink Count is the number of times the series is run through. Try 5. Then hit Done.

To start the blinking, go to Blink/Blink.
If you want to end the iterations before they are done, simply select Blink/Stop Blink. The blinking will stop at the end of the current series.


Region Of Disinterest

One handy tool to know about is the Region of Disinterest (ROD). On the ROI Window, go to Plot/Define ROD and an Annotate Window will appear.

With this window you can do several things on the ROI:

When you are done, you can go to the File menu and save the images as a postscript or a bitmap. If you choose to just save, it will be a .dat file.

The areas marked with the ROD are not used for calculations such as Radial Profile, Cross Section, etc.

File/Clear will erase everything that was done.


Histogram

The Histogram feature allows you to see a histogram of the pixel values for the ROI. It is found on the ROI Window under Plot/Histogram.
You can control the max and min pixel values displayed, the number of bins, and "nsigma" of outliers that should not be plotted. You can also click with the left mouse button on the left side of the plot or with the right mouse button on the right side of the plot to clip the range of the histogram.
"Full" will return the graph to its original state.


ROI - Polygon/Move Polygon/Edit Polygon

To select an area in the ROI, select the Polygon Mouse Mode, and click around an object and double click when you have the shape you want completed. The Polygon Statistics, request Plate Scale widget will appear. The three MIPS wavelengths have the following plate scales:

Click "Done" and the following statistics for inside the polygon will appear:

If you select Move Polygon then click inside the polygon and drag to a new location, when you release the statistics will be recalculated for the new area.

If you would like to change the shape of the polygon, select Edit Polygon. You can either click and drag a corner or side or you can click near it and it will automatically be redrawn. The new statistics will also be calculated to account for the new shape.

More information is on the Polygon page.


ROI- Contour Map and Surface Plots

Two interesting features on the ROI Window are the Contour Map and the Surface Plots. Both can be found under the Plot menu.

Contour Map - This will pop up a window with the contour map of the image. You can control how many levels are shown, if it uses log or linear spacing between the levels, and you can look at it over the original ROI.

Surface Plots gives you three options: Surface, Shade_Surf, and Surf_Play. Surface give a surface plot of the ROI (might be useful to spot cosmic rays). Shade_Surf does this also, but in color. Surf_Play lets you rotate the image as well as many other options.


Save Parameters

After you have done some work, such as loaded files, resampled images, aligned images, etc., you can save your work by using the File/Save List Parameter from the Main Display Window. You can then exit idp3, come back at a later time, and use File/Restore List/Parameter to load all of the files in the condition that you saved them in.

This is also handy if you know you are going to do the same thing to a different set of images. You can then edit the .par file and put in the new image file names.