Science With the Virtual Observatory
2005 Summer School

Correlation Services and Science in the VO

Overview

Through the course of this talk we will be using various VO tools to work on two distinct science projects.  First, we will use WESIX and VOPlot to obtain an approximate calibration for an image.  We will then compute the detection threshold for the image.  In the second project, we will use OpenSkyQuery.org, Topcat, and VOPlot to construct a diagnostic diagram for differentiating galaxies with active nuclei from galaxies with intense star formation.

Part 1:  Image Callibraion

Step 1:  Obtain image catalog and cross-match

For this exercise, we will use an R-band image from the Fundamental Plane survey (P.I. Mike Hudson) of cluster 2006 from the C4 catalog (Miller et al. 2004).  In order to callibrate the photometry from the image, we must first decide which filter to callibrate to.  Below is an image of the SDSS filters with the Cousins R filter. 

As seen above, the R-band overlaps with both the r' and i' filters.  Since the peak in the R-band filter curve corresponds more closely with the peak of the r' response curve, we choose to callibrate against stars observed in the r' filter.

In order to extract the sources and cross match with SDSS, we will use WESIX.  You may point your browser to either:
http://nvogre.phyast.pitt.edu:8080/wsexttest
or
http://frank.phyast.pitt.edu:8080/wsexttest.

If you do not wish to use WESIX, you may download the cross matched catalog here.

In the URL text box, enter the url of the fits file: http://frank.phyast.pitt.edu/~simon/2006.fits.  From the cross match catalog box, choose SDSSDR3.  Make sure you have chosen to use the advanced page before clicking next.  On the next page, you can choose the fields to return from SExtractor and SDSS.  Make sure, at the minimum, you choose:

SExtractor:
MAG_ISO
FWHM_IMAGE

SDSSDR3:
psfmag_r
type

SExtractor params:
Detection threshold = 15
Check the box so that no convolution filter is used

Now click "Go do it."    Once the server returns, you may download the cross matched catalog, or simply click the plotter option to do the analysis in your browser.

Step 2:  Get the calibration parameters

Load your cross matched catalog into VOPlot.  We will need to plot the SDSS magnitudes with the SExtractor magnitudes.  To insure that we only are looking at stars we will set a filter.  Under "Functions" choose "Create Filters."  I call my filter star.  We want to make sure that the sdssdr3_type value is 6.  In my VOTable, sdssdr3_type is in column 8.  Thus, my filter statement will read:
$8 == 6.

filter

Now, we will find the offset value.  Add a new column by choosing "Create New Columns" from under the "Functions" tab.  Add a new column which is the difference between the SDSS r magnitude and the SExtractor iso magnitude.  For my table, I create a column using the expression "$5 - $10."

col

Now plot the new column on the Y axis and the SDSS r magnitude on the X axis.  Make sure that you have used the filter to select only stars.  We can now read off the approximate offset value.  For me, this is about 28.8.

We now need to read off the seeing.  Plot the fwhm output by SExtractor as a histogram.  The peak of this distribution is a good approximation of the seeing.  For my file, it is about 4.0 pixels.  You may want to adjust the number of bins by editing the plot properties under "View."

Step 3:  Use SExtractor to Extract the Catalog

We will use the WESIX web service client program to execute SExtractor with the appropriate input parameters.

$> source $NVOSS_HOME/bin/setup.csh
$> cd $NVOSS_HOME/java/dev/wesixclient
Listing 1

In order for SExtractor to return the data we want, we need to set some of the input and output parameters.  The listing below shows the code as it should appear before editing and then again after.  The changes are in bold.

Client_axis.java  Before:
26: String filename = "http://frank.phyast.pitt.edu/~simon/fpC-002243-r4-0320.fit";
.
.
.
53: //1 sparms.setFILTER_NAME("gauss_3.4_7x7.conv");
54: //1 sparms.setFILTER("Y");
55: //1 sparms.setMAG_ZEROPOINT(28.2);

Client_axis.java After:
26: String filename = "http://frank.phyast.pitt.edu/~simon/2006.fits";
.
.
.
53: sparms.setFILTER_NAME("gauss_4.0_7x7.conv"); //Comment deleted
54: sparms.setFILTER("Y"); //Comment deleted
55: sparms.setMAG_ZEROPOINT(28.8); //Comment deleted

Add the following lines to Client_axis.java:
oparms.setFLUX_MAX(true);
oparms.setTHRESHOLD(true);
sparms.setDETECT_THRESH(1.0);
Listing 2

Now we can run the file through SExtractor with the correct convolution filter and magnitude offset.
Note:  Before running the compile command, you can edit the build.xml file to use a different WESIX server (to reduce load on the server which resides at http://frank.phyast.pitt.edu).  Simply change the word "frank" to the word "nvogre" on line 24 of the build.xml file.

$> ant compile
$> java client.Client_axis
Listing 3

Step 4:  Plot Your Results in VOPlot (or Mirage)

When you ran the client program, you should have created a VOTable called votBig.xml.  This is where the extracted catalog resides.  To view this table, we can use either VOPlot or Mirage.  I will be using VOPlot.

We are interested in the detection threshold at a particular confidence.  I wish to find the threshold at the 5σ level. Since we have returned the THRESHOLD and FLUX_MAX values to be returned, we can create a filter which mandates that the maximum flux for the object is at least five times greater than the threshold value.    The following figure shows the window in which I have defined my filter.
add

Now that we have a filter all we have to do to find the magnitude threshold of the image is to histogram the magnitude values from the catalog.  I use the 'MAG_BEST' values and hit the histogram button after making sure that the 5sig filter is selected.  I find that the tail of the histogram is about 22.5.  Thus, I have discovered that the detection threshold on this particular image is about 22.5 in SDSS r.

Part 2:

Summary of Science

We have a list of the brightest cluster galaxies (BCGs) from the C4 catalog compiled by C. Miller. In order to study the properties of BCGs we would like to determine which of them are active galactic nuclei (AGN). The diagnostic diagrams introduced by Osterbrock et al. 1989 and developed further in Kewley et al. 2001 provide the tool necessary to differentiate between AGN and starforming galaxies. We will use VO tools to create the Osterbrock diagram for the BCGs in the C4 catalog.

Step 1:  Upload the BCG Catalog

The upload client uses the SkyPortal web service to upload a file to a temporary table. It completes the following tasks:

  • Read a comma separated value text file
  • Parse the file into a VOTable
  • Use the methods exposed by the SkyPortal web service to upload the contents of the file
  • Print the name of the temporary table
  • Execute a generic cross match query to check the validity of the upload
  • Print results of the query to file and to screen

  • Step 1: Execute the upload client by running the upload client.

    $>cd $NVOSS2005/java/dev/skyportaluploadclient
    $>ant compile
    $>java skyclient.SkyClientUpload
    Listing 1

    Record the name of the temporary table. You can use a table previously uploaded. The name of the table is TMP_27208.

    Step 2:  Query OpenSkyQuery

    Now we will use the web interface located here to retrieve line information for each of the BCGs.

    Once you have the web interface open, execute the following four ADQL queries. Each one will get the height and width information for each of the following lines: OIII, Hβ, NII, Hα respectively. After each query completes, download and save the tables in VOTable format. My suggestion is to save them with the names OIII.xml, Hb.xml, NII.xml, and Ha.xml to keep them straight when merging the tables.

    File: OIII.xml
    SELECT t.id, o.objid, o.ra,
    o.dec, o.g, t.*,
    s.height, s.sigma, s.wave,
    s.restWave
    FROM
    SDSSDR3:PhotoPrimary o, MyData:TMP_27208 t,
    SDSSDR3:specline s
    WHERE XMATCH(o, t) < 3.5 AND
    o.specobjid = s.specobjid AND
    s.restWave between 5008.2 and 5008.3

    File: Hb.xml
    SELECT t.id, o.objid, o.ra,
    o.dec, o.g, t.*,
    s.height, s.sigma, s.wave,
    s.restWave
    FROM
    SDSSDR3:PhotoPrimary o, MyData:TMP_27208 t,
    SDSSDR3:specline s
    WHERE XMATCH(o, t) < 3.5 AND
    o.specobjid = s.specobjid AND
    s.restWave between 4862.65 and 4862.75

    File: NII.xml
    SELECT t.id, o.objid, o.ra,
    o.dec, o.g, t.*,
    s.height, s.sigma, s.wave,
    s.restWave
    FROM
    SDSSDR3:PhotoPrimary o, MyData:TMP_27208 t,
    SDSSDR3:specline s
    WHERE XMATCH(o, t) < 3.5 AND
    o.specobjid = s.specobjid AND
    s.restWave between 6585.2 and 6585.3

    File: Ha.xml
    SELECT t.id, o.objid, o.ra,
    o.dec, o.g, t.*,
    s.height, s.sigma, s.wave,
    s.restWave
    FROM
    SDSSDR3:PhotoPrimary o, MyData:TMP_27208 t,
    SDSSDR3:specline s
    WHERE XMATCH(o, t) < 3.5 AND
    o.specobjid = s.specobjid AND
    s.restWave between 6564.55 and 6564.65
    Listing 2

    Step 3:  Merge Tables

    Now we will use the Starlink Topcat tool to merge the tables into one table with all the information we need to create the diagnostic diagram. On my linux machine, I start Topcat with the following command. This will vary slightly with platform.

    $>topcat [A-Z]*.xml
    Listing 3

    This should open a window like the one shown in Figure 1. start
    Figure 1

    Click on the button depicting the two matches. This button is circled in red in Figure 1. Activating the match tool will bring up a new window. The match window is shown in Figure  2.

     match
    Figure 2.

    We will be doing an exact value match since all the tables have the same sdssdr3_objid field. Once the form is set up to go, hit "Go." The way that I suggest doing the matching is to first match OIII.xml and Hb.xml on sdssdr3_objid. Then match NII.xml and Ha.xml on sdssdr3_objid. Finally, match the two previously matched tables on sdssdr3_objid_1 and sdssdr3_objid_2 respectively. For comparison, a copy of my matched VOTable is available here. If you did not get through the matching portion, download the one I have put together so that you can follow along with the next section.

    Step 4:  Plot the Osterbrock Diagram

    We now have all the information necessary to make our diagnostic diagram in the matched VOTable created in the previous section. Now we will use VOPlot to complete this exercise. Start voplot:

    $>voplot
    Listing 4

    Load the matched VOTable by going to the 'File' button and clicking on 'Open' in the dropdown menu. Chose your VOTable file from the dialog box.

    We wish to plot two quantities which are not explicitly in the table, so we must add some columns. The diagnostic diagram compares the line flux ratio of the [OIII] over Hβ to [NII] over Hα. To get the individual line fluxes, we must multiply the height and the measured width (sigma) for each line, the we take the log of each ratio so that we can look at the diagram in log-log space. If you have followed my method for combining the tables, or have downloaded my matched file this would be done clicking on the "Functions" button at the top of the VOPlot window and then choosing "Create new columns." This should pop up a window like the one shown in Figure 3.

    coladd
    Figure 3

    In Figure 3, I have already added a name for the new column and the correct expression for the new column. You should now do the same. The expressions are as follows (again, this is only if you have followed my method above, or have downloaded my matched file):

  • OIII/Hb: log(($6*$7)/($26*$27))
  • NII/Ha: log(($47*$48)/($67*$68))
  • We now finish off the exercise by plotting our new columns against each other (see Figure 4).plot
    Figure 4.

    Most of the points in this diagram are in the area designated to be populated by active galactic nuclei. Models for comparison are available in the further reading section. We have discovered that most of the brightest cluster members with measured lines have active galactic nuclei.  For comparison, I have included another plot showing the same Osterbrock diagram with SDSS galaxies.

    ost
    Figure from Miller et al. 2003 (astro-ph/0307124)

    Student Exercise:

    Use the Osterbrock diagram constructed in this exercise to form a VOTable of the most extreme AGN. Use this new table in conjunction with OpenSkyQuery.org to find out some information about the X-Ray properties of these brightest cluster galaxies.

    Useful Links:

    VOPlot
    TOPCAT
    OpenSkyQuery
    WESIX

    For more information on the theory behind the diagnostic plots see the following and references therein.

    Kewley et al. 2001
    Kauffmann et al. 2003



    The NVO Summer School is made possible through the support of the National Science Foundation and the National Aeronautics and Space Administration.