Next: 6 dataset_3d Tool
Up: User's Guide for the
Previous: 4 dataset_1d Tool
Subsections
5 dataset_2d Tool
The dataset_2d tool is used to study the distribution of bivariate datasets. If supplied with two simple vectors containing N measurements of two quantities, dataset_2d will estimate the probability density function that describes the dataset, for example by computing a 2-D histogram of the data (an ``image''), and will allow the user to visualize the density. Analysis may be restricted to a subset of the data by specifying a range of values to include or exclude.
Many of the controls are the same as for the dataset_1d tool (Section 4).
The following sections describe the specific capabilities of dataset_2d.
5.1 Getting Datasets into dataset_2d
- As described in Sections 3.3.4 & 3.3, Event Browser can send one or more named datasets into dataset_2d.
- The menu selection File
Load 2-D Dataset can be used to read two columns of data from a FITS binary table or an ASCII file.
- From the IDL prompt you can load two vectors of data into dataset_2d (Section 8).
- If you bivariate data has already been binned, i.e. you're starting with an ``image'' (2-D histogram), then you can play a little trick to get it into dataset_2d. The dataset_2d tool was written so that each (x,y) data point could optionally be assigned a ``weight'' that represents a repeat count. For example a weight of 10 on a data point (x0,y0) is shorthand for supplying 10 data points with value (x0,y0). The trick is to decompose your NxM array into a set of (N*M) weighted bivariate data points. The (x,y) values of those data points are the coordinates of each of the pixels in the image.
If you have your image in an IDL array, then you play this trick by calling the routine function_2d (Section 8). If your image is in the primary HDU of a FITS file, then you play this trick with the fits_viewer tool (Section 8).
5.2 Mode Droplist
A droplist just above the plot controls the basic mathematical entity that
is displayed.
- Scatter Plot: The position of each 2-D datapoint is simply
plotted. The plot symbol and color may be changed by pressing the Edit button.
- Image: A binned density function for the 2-D dataset is
estimated and displayed as a grey-scale or false-color image (see
Figure 7). The bin sizes and phase, and the scaling of the image (linear vs. log) may be changed by pressing the
Edit button. The density may be smoothed (see
Section 4). The buttons Image Scaling and
Color Table let you control the
appearance of the image. A colorbar is shown next to the image.
Figure 7:
Image and Contour Plot in Bivariate Analysis Widget
 |
- Contour Plot: A binned density function for the 2-D
dataset is estimated and displayed as a contour plot (see
Figure 7). The contours produced may be controlled by pressing the Edit button and entering a list of keyword parameters that will be passed to IDL's routine CONTOUR (see the IDL online or paper manual).
- Surface Plot: A binned density function for the 2-D
dataset is estimated and displayed as a surface plot. Pressing the
Edit button lets you select wire mesh, lego, or shaded styles
(see Figure 8). The button 3-D Perspective
lets you control the 3D orientation of the surface plot.
Figure 8:
Surface Plots in Bivariate Analysis Widget
 |
- Contour on Image: A contour plot is drawn on top of an image. If the tool has only one unhidden dataset then it is used to compute both the image and the contours. If the tool has two unhidden datasets loaded then the selected dataset is used for the image and the other one is used for the contours.
If you're working with two datasets then obviously they must be defined on a common coordinate system. This is the slightly tricky part.
- If you sequentially define two different Working Datasets in Event Browser (Section 3.3) then they share a coordinate system and can be overlayed.
- If you load two datasets by reading two columns of values from a file or by calling dataset_2d from the IDL prompt (Section 5.1) then it is assumed that you've put them in a common coordinate system beforehand.
- If you load two images using function_2d or fits_viewer (Section 5.1) then it is assumed that you've aligned the images beforehand. The IDL routines REBIN & CONGRID will be helpful for arrays already in IDL, while the Astro Library (/usr/local/rsi/lib/LibAstro/contents.txt) routines hastrom.pro, hcongrid.pro,
hextract.pro, hrebin.pro, etc. will be helpful for FITS images.
In the common situation where you have an x-ray event list and an optical or radio image, your best bet is probably the following:
- Save a FITS image of the x-rays, either with Event Browser or dmcopy. It would probably be good to choose a binsize close to that used in your optical image.
- Use hastrom.pro to align your two FITS images.
- Use fits_viewer to get the two aligned FITS images into dataset_2d.
These are essentially the same as those found on the Univariate
Analysis widget, except that regions-of-interest come in more styles
than a simple 1-D interval. As before, you can either type in region
parameters in the Edit dialog box or you can use mouse to
position the large and small markers, then define the region using the
marker positions. For an annular-style region-of-interest, the center
of the annulus is placed at the large marker and the outer limit of the
annulus passes through the small marker. An inner limit of the annulus
may be entered in the Edit dialog box.
5.4 Analysis Menu
The following menu items are found under the Analysis menu.
- Mark Centroid: This moves the big marker to the centroid of the current region of interest (ROI). Since the Big Marker is also
used to define the center of a annular-style ROI, you may find it useful to
iteratively ``peak up'' on a source by alternately defining an annular ROI (use Markers) and moving the marker to the centroid (Mark Centroid). The centroid of the region-of-interest is displayed in the status line just above the plot. The marker position in both plot and world coordinates can be found from the Titles dialog box.
- Radial Profile from Reference Point: This spawns separate
tools that show encircled energy, radial surface brightness, and theta-distribution plots
with respect to a reference point specified by the user. The default
reference point location is the centroid of the dataset.
- Distribution of Density Function Samples: This sends the
density function values (image pixels if you will) as a 1-D dataset to
another tool for analysis.
- Cuts Through Big Marker: This spawns two function_1d tools
that display horizontal and vertical cuts through the density function.
- Linear Regression: This performs a linear regression fit to
the bivariate dataset (only useful when the two event properties are
correlated).
- Linear Regression with sigma clipping: This performs a repeated linear regression, excluding outliers defined by the previous regression. This can be used as a very rough estimator of charge transfer inefficiency in a plot of energy vs. position.
- Combine Images: This creates a window that lets you combine images from any TARA tools currently running, via addition, subtraction, division, or true color modeling (Section 7.
- Blink Images: Images formed from all the datasets are sent to IDL's animation tool.
Next: 6 dataset_3d Tool
Up: User's Guide for the
Previous: 4 dataset_1d Tool
Patrick Broos
Penn State Department of Astronomy
2008-02-15