Part 3: First Look at Quantitative Analysis using ds9
Introduction
Having looked at Cas-A
in a qualitative way, we now want to begin to focus on more quantitative
study. In general, we investigate X-ray emitting objects such
as Cas-A by studying the positions, energies or arrival times
of the x-ray photons recorded by a Chandra x-ray detector. You
already looked at position information in the previous section
when you explosed the "value" feature and when you
created horizontal and vertical cut graphs. But quantitative
analysis generally is not performed on the whole data set. An
astronomer might run a program on the whole data set in order
to determine likely regions of interest. Then she or he selects
one or more interesting features on which to perform more detailed
quantitative analysis.
In the Cas-A data we are studying, there are a lot of interesting
features. The image looks like an irregular ring of x-ray photons
with both brighter and relatively more empty spots inside the
ring. One question an astronomer might ask is, which part of
the image is brightest, i.e., which pixels have the greatest
concentrations of x-ray photons? As you saw in Learning ds9,
Part 1, we can review numbers of photons in each pixel by moving
the mouse around while looking at the DS9 Value display. But
this technique has several drawbacks. You have to remember each
piece of data that the table gives you, and calculating any contrasts
and comparisons by hand would be very time-consuming.
A quick list of the
basic techniques of x-ray analysis:
look at an x-ray image
using ds9 to get a qualitative feel for the data
use ds9 to select one or
more regions of interest
perform quantitative analysis
- spatial, spectral, or timing
analysis - on the regions
you have selected
In Part 1, we did an
exercise that viewed the region around physical X,Y of 4158,4398.
That region appears to have fairly large photon values in each
nearby pixel. (If you don't remember the results of this exercise,
you might want to try it again: click here to return to the directions). To confirm
what we saw in our "qualitative" look at that data,
we want to analyze the concentrations of photons "quantitatively".
We want to compare and contrast the numbers of photons in different
regions of the data. We might want, for instance, to know the
average number of x-ray photons per pixel in our area of interest
compared to other areas in the data set.
Typically, an astronomer starts quantitative analysis by identifying
some regions of interest in which to do his or her analysis.
Then she or he will run some programs to produce quantitative
results.
Note: If you have just opened this
session, make sure that you have started ds9, connected to the
analysis program through the Analysis menu, and loaded the If you are continuing from a previous session,
be sure that you have removed any previous contours or other
markings on the image.
Defining (selecting) Regions of
Interest
First, we need to
learn how to define regions of interest, known more colloquially
to astronomers simply as regions. ds9 provides a very sophisticated
capability to define regions which is accessed through the Region
menu. However, we will start with the most often used region,
a single circle.
The single circle is already defined in ds9 so you can create
a circular region directly without use of the Region menu.
Creating a single circular region
The basic technique is
to move the mouse to the place on the image where you want to
place the region and press the left mouse button. (Don't drag
with the right mouse button depressed or you will change the
color and contrast of your image!)
For this learning exercise,
we will select the region viewed through the value table in Part
1. While watching the physical x,y display, move the mouse near
the point where x,y are equal to 4158,4398 and click the left
button. You can also do this by looking for the feature in the
image itself. Don't worry if you are not exactly on that point.
When you click the left
button, a green circle is drawn on the screen. By default, the
radius of this circle is 20 pixels. This is a region marker and
we will use it to perform analysis on the data within that region
of the image.
Adjusting position
of Region Marker
Is the region not exactly
where you want it? No problem. Move the mouse into the region
and press the left mouse button.
While keeping the left
button pressed, move the mouse: the region marker will start
to move as well. You now can line up the mouse with X,Y of 4158,4398
by watching ds9's X,Y position display.
For even more control,
click the mouse once inside the region. The region will become
selected and will display 4 square handles at its corners. When
selected, you can use the arrow keys on your keyboard to fine-tune
the region position.
When you have placed the
region exactly where you want it, click the left button of the
mouse in the region to de-select.
Resizing the Region
In this exercise, we would
like to determine how many x-ray photons are in the bright area
right at X,Y 4158,4398 without processing too many of the pixels
surrounding it. The default size of the region is a little too
large for our needs so we need to decrease the size.
Select the region by clicking
once inside the region with the left mouse button. The region
will become selected and will display four square handles at
its corners.
Move the mouse over one
of the four handles (so that the cursor changes from its usual
arrow) and press down the left mouse button.
While keeping the left
mouse button pressed, resize the region by moving the mouse in
or out : see how the size of the circle gets larger and smaller.
When you have adjusted the size to include just the bright area
at X,Y 4158,4398, release the left mouse button.
We
are going to use this re-sized region marker in the spatial analysis
exercise below. However, we first need to digress to explain
more about Region controls. You may want simply to read this
section so that the region marker you just defined is preserved.
If you make any changes, you will have to recreate it to do the
spatial exercise.
Region Menu &
Tool Bar
In the ds9 window you will see a button for "Region"
in two areas. The Region button in the top navigation bar controls
the Region menu. The Region button in the lower tool bar control
short cuts.
To use the region menu
and access the full range of region options, click on the top
bar and use the pulldown menu.
To use the shortcuts of
some more often used options, click on the Regions button in
the upper line of the lower tool bar. When you do that, the lower
line of the tool bar will display a set of options. To see more
options click on the regions button in the lower line and the
options will toggle to the second set.
This second Region Toolbar
is shown below.
Regions Delete Function
The regions function remembers the last shape or option that
you used. If, for instance, you have made circular annuli, and
you click delete all, you will have deleted them from the image,
but if you click again on the image, intending to create, for
instance, a single circular region, you will instead recreate
a default annulus region.
What you must do is use either the top level region pull down
menu or the region tool bar to reset your shape choice to "circle".
The you can make single circles either by using the top region
menu, the lower tool bar, or by clicking directly on the image.
Complex Regions
The information in this
section is an advanced lesson for you to experiment with. We
suggest that you continue your current session with the quantitative
analysis exercises described in the Spatial analysis section
which follows. That exercise requires you to use the region of
interest you have just defined for the bright area at X,Y 4158,4398.
If you do not go to the analysis exercises at this point, you
will have to recreate this region. If you come back to the spatial
exercise, be sure to check, and if necessary reset your region
shape, as described above, before attempting to recreate the
single circle region at X,Y 4158,4398.
ds9 allows you to define differently shaped regions interactively,
with full control over position, size, rotation, etc. The full
set of options for working with regions are found in the Region
menu in the top menu bar of the ds9 program.
You can make regions of
different shapes, including circles, ellipses, boxes, polygons.
Generally, astronomers will use either a single circle or annuli,
which are multiple concentric circles. Astronomers will sometimes
choose a different shape in order to cover an area of interest
completely with minimal inclusion of unwanted area. For example,
a region might be better covered by a rotated ellipse or a carefully
constructed multi-sided polygon. But in general, circles are
most often used.
Regions also can be defined
to exclude an area from a region of interest, for example, to
exclude an elliptical region within a polygon.
To try out advanced region
shapes, go to the Region menu in the top menu bar of the
ds9 program. The instructions for selecting, deselecting, adjusting
pospositionhanging size and deleting are the same as for circles.
Remember to delete any regions you have created before going
on to the next section.
Spatial Analysis
We are now going to run some programs on our region of interest
which will give us a quantitative result. To use these programs
you must have defined a single circle region of interest at the
position X,Y 4158,4398 (as described above.) The Counts in Regions
and Radial Profile Plot perform analysis on the position information
of each detected x-ray photon. They essentially count up the
number of x-ray photons within a given spatial region and give
you visual output that allows you to compare results.
The Analysis Tools
menu can be accessed by choosing Analysis on the menu
and Chandra Ed Analysis Tools from the drop down box.
Clicking on the dotted line
at the top of the menu will open this tool menu onto your desktop.
Counts in Regions
The analysis we want to run
first is called Counts in Regions. The program sums up
the x-ray photons in the region(s) specified.
To run this program:
Pull down the Analysis
menu and select the menu option Counts in Regions.
In a few seconds, a window
will display your analysis results.
The net_counts value is
the number of x-ray events inside the region.
The surf_bri (surface brightness)
value is a measure of the average number of x-ray photons in
a unit area
Click here for a more detailed
discussion of what this kind of analysis means, and an exercise.
Now move the region around
to different places on the Cas-A image and run Counts in Regions
in different locations. Doing this will give you a quantitative
idea of how strong the x-ray emission is in various parts of
the image.
When you finish, delete
the circular region by pulling down the Region menu and selecting
the Delete All menu option. Alternatively, you can put the mouse
inside the region and press the Delete key.
Radial Profile Plot
To get a better idea of the
shape of x-ray emission from interesting parts of Cas-A, we can
run another program on our regions of interest called a Radial
Profile Plot. This program will display a graphical plot
of the brightness of the x-ray emission (average number of photons
per unit area) in concentric annuli around a central point.
If the x-ray emission in
our region is coming from a very strong central source, the shape
of the plot will fall off steeply.
If the x-ray emission is
less strong (but still coming from a central source), the plot
will have a more gradual downward slope.
If the x-ray emission comes
from a diffuse source, the plot might not even have a recognizable
shape.
Creating Annuli Regions
Because the radial profile
program plots the brightness at defined points moving outward
from the center of the region, the radial profile plot runs on
a different kind of region of interest, the circular annuli.
To create a radial profile plot we must create an annulus region
instead of a single circle.
Again, for this exercise, choose the area of the Cas-A image
where X,Y equal 4158,4398.
Pull down the Region menu,
select the Shape sub-menu.
In the Shape sub-menu,
choose the Annulus sub-menu option.
Create an annular region
by moving the mouse to the location on the image where you want
to place the region and click the left mouse button.
By default, an annulus
region with 2 annuli will be displayed.
Adjusting Annulus Parameters
To change the number of
annuli:
Double click inside the
region to bring up the Annulus dialog box.
Change the value of 2 in
the Annuli input area to, say, 10.
Press the Generate
button and then the Apply button, in that order.
You now will see that the
number of concentric rings making up the annulus region has changed,
in this example to 10 concentric annuli.
You can also change other
annulus parameters. For example, you can change the size of the
annulus by changing the Outer Radius value.
When you have finished
adjusting the annulus region, press the Close button in
the Annulus dialog box.
Running the Radial Profile Plot
Having created an annulus region,
we now can run Radial Profile Plot.
Pull down the Analysis
menu and select the Radial Profile Plot menu option.
In a few seconds, a plot
window will display your analysis results.
Try running this analysis
program on annuli in different places on the Cas-A image by moving
the annulus. For example, move it to near Physical X,Y = 4506,4576
(in the "empty" part of the image). See how the resulting
radial profile is much different from that of the bright area
at X,Y = 4158,4398.
When you have finished,
pull down the Region menu and select Delete All
to remove the annulus region.
Spectral Analysis
With Counts in Region
and Radial Profile Plot we performed analyses on the position
information of the photons. Now we want to perform analysis on
the spectral (energy) and timing information associated with
the X-ray photons that Chandra detected from Cas A. Learning
about the energy characteristics of x-ray emission is an extremely
important part the science we can get from this Chandra observation.
These characteristics can tell us much about the material composition
of the object, as well as the physical processes that it is undergoing.
The first step in spectral analysis is to extract the energy
information in the form of a spectrum.
A spectrum is a one dimensional
histogram of the number of x-ray photons falling into each of
the discrete energy ranges (or bins) that the Chandra detector
(ACIS) can identify.
We usually do this within
a single circular region of interest, just as we did for spatial
analysis with the Counts in Regions task. Before you start,
be sure that you have deleted any other regions created prior
to this exercise. And, since the region shape was changed to
"annulus" in the last exercise, you must change it
back to "circle" for this exercise.
Energy Spectrum Plot
Create a circular region.
Since the region menu will retain the last shape used, which
was the annulus, we cannot just click on the image to create
the circle. First, you must use either the Shape sub-menu of
the Region menu or the region tool bar to set the shape back
to "circle". Then move the cursor in the image to the
area on which you want to center the region and click the left
mouse button.
Create a region at the
bright area X,Y = 4158,4398, pull down the analysis menu and
run the Energy Spectrum Plot.
Move the region and run
the Energy Spectrum plot at other areas around the image. Notice
how the spectrum changes.
Binning for Plots
The Chandra data set you are using
is an ACIS observation and has a binning time of 3.2401 seconds.
Any photon that is detected within that interval will be assigned
the same arrival time. We therefore must decide how to divide
up our data. We can choose to do this in a number of ways. The
most informative is to choose a bin width that has a reasonable
number of photons in it, and to normalize it as a function of
time, so that we can see the count rate, i.e. the number of counts
each second that the satellite detects. For now, you can enter
32.401 seconds
Timing Analysis
A similar analysis can be made
of the timing information associated with each x-ray photon.
Once again, we perform the analysis in circular regions of interest.
This time, however, we extract timing information from the data
in the form of a light curve.
A light curve is a one-dimensional
histogram of the number of x-ray photons that fall into discrete
time bins.
Plotting a Light Curve
Select a circular region
by clicking on the Cas A image. (You can do this by clicking
directly on the image because "circle" is still the
selected shape in the Region menu.) Again, you can start with
the bright area X,Y = 4158,4398.
Go to the Analysis
menu and click on the option Light Curve.
When you select this task,
a dialog box will pop up asking you to enter the number of bins
to use. Specifying the number of bins is necessary because the
timing information recorded by ACIS and HRC is not continuous,
but has values that get read out by the instrument in discrete
intervals.
Enter a binning time of
32.401 seconds in the top line of the dialog box, and check both
boxes in the two subsequent lines. The value 32.401 is the binning
time of the observation multiplied by 10 so that there are enough
photons in each bin to give us a count rate we can see.
Move the circular region
and run the Light Curve Plot analysis task from the Analysis
menu at different places on the Cas-A image. Notice if the light
curve changes and try to correlate the changes with what you
see in the image.
Summary
The activities and exercises
in these sections were designed to familiarize you with the features
and controls of the ds9 imaging system, and the functions on
the analysis menu. We have concentrated on what you are doing,
not really why you are doing it. You should repeat these activities
and exercises and invent some of your own until you are comfortable
using ds9. When you use the Activities
and Images section it will be important to be able to focus
on the science content.