TOPCAT Exercises
Resources
Some of the following may be useful:
Exercise 0: Run TOPCAT
- Java needs to be installed and on your path.
Any non-ancient version should do.
Download
JRE from Oracle
if necessary.
- Download topcat-full.jar
(for Un*x, you can also download shell script
topcat
and put it with
chmod +x
in the same directory).
- Start it up:
java -jar topcat-full.jar
,
or click on jar file, or run topcat
shell script
Exercise 1: Visualisation
This exercise downloads some Tycho data with positions and proper motions
from VizieR, views it in various ways in TOPCAT,
identifies a co-moving group, and examines that in colour-magnitude space.
Thanks to Niall Deacon from Hawaii for the basic idea.
Get Tycho data in region of Pleiades
- Open VizieR load dialogue:
menu item VO|VizieR Catalogue Service
- In Row Selection panel:
- Enter "
pleiades
" into Object Name field
- Hit Resolve to fill in RA/Dec fields
(from SIMBAD)
- Enter "
2
" (degrees) into Radius field
- In Catalogue Selection panel:
- Select Surveys tab
- Select Tycho-2 line
- Hit OK button
- This should load some new tables I_259_* into TOPCAT.
The most useful is I_259_tyc2. Select it by clicking on it
in the list on the left of the control window.
(If you can't get it working, use this one:
tycho_pleiades.xml)
- Examine the table by looking at its data and metadata;
toolbar buttons:
-
Table Data
-
Table Parameters
- metadata about the table as a whole
(not much there in this case actually)
-
Column Info
- metadata about each column
Plot the source positions on the sky
- Open a Sky Plot
- Ensure the right thing is chosen to plot in the Position tab:
-
Table field:
I_259_tyc2
-
Lon field: some kind of Right Ascension
-
Lat field: some kind of Declination
- You should see a few hundred points in a circle
(exact number displayed at bottom of screen).
- Zoom out and in (mouse wheel or Right-button-drag or CTRL-drag).
Note zoom is around mouse position.
See line at the bottom of the window for navigation help.
- Pan around (Left-button drag)
- Investigate Axes control
Projection tab to change sky projection
- Use the Float Controls
toolbar button if it
fits your screen better
(Optional) Plot source proper motion vectors on the sky
- Ensure you have a Sky Plot
and
the Data control
control is selected
- Click the Form tab
- Play with the Shape and Size selectors
- You already (by default) have a Mark
control which plots a small square at each position.
- Now plot proper motion vectors at each position by
clicking the
button.
See a new Vector
control appear in the stack.
- This needs to know the vector components.
Fill in the Proper Motion Longitude/Latitude fields
with "
pmRA
" and "pmDE
".
See all the little arrows.
- You can turn the point markers and vectors on and off independently
by clicking the checkboxes by the side of their controls in the stack.
- You can change the arrow sizes with the Scale slider.
- If you want to colour the arrows or points by direction:
- Set the (Shading) Mode selector
to
aux
- Set the Aux field to "
atan2(pmDE,pmRA)
"
- Choose the Aux Axis
control
in the left hand control stack,
and set the Shader selector to Hue
(this colour map wraps round so makes more sense for colouring a
periodic value).
Now arrows pointing in the same direction all have the same
colours.
Identify co-moving objects
- Open a Plane Plot
- In the Position tab:
-
Table field:
I_259_tyc2
-
X field:
pmRA
-
Y field:
pmDE
- Zoom and pan to position the points where you can see them
(navigation hints and help button are at the bottom of the screen)
- Observe two populations: most (not moving much) near (0,0),
but a co-moving population clustered near (20,-45)
- Select the co-moving population:
- Click
Draw Subset Region
- Drag a shape round the co-moving sub-population
- Click
again
-
New Subset dialogue should pop up:
Enter New Subset Name (e.g. "
comoving
")
and hit Add Subset.
- Observe the selected points have changed colour
- This is now a new Row Subset
- Open the
Row Subsets window
(from main window toolbar)
- There should be two subsets listed: All, and the one you
just created. See how many rows the new one has (~200?)
- Add a complement set by clicking the new subset to select it
and hitting the
Invert Subset
toolbar button
- Go to a plot (either one you've already done or a new one)
and click the Subsets tab.
- Click the checkboxes to turn the different subsets
(
All
, comoving
, not_comoving
)
on and off. You can change the order they are plotted in
(which shows on top) by dragging the drag handle
up and down.
Plot colour magnitude diagram
- Open a Plane Plot
- In the Position tab:
-
Table field:
I_259_tyc2
-
X field:
BTmag - VTmag
(just type it in)
-
Y field:
VTmag
- Reverse the Y axis:
- Click Axes control
control
- In Coords tab click Y Flip checkbox
- Return to Data control
- Select Subsets tab
- Make sure the
comoving
subset is plotted.
See the comoving population tightly grouped in colour-magnitude space.
Optional: Send using SAMP
- If you have some other SAMP-aware tool running (e.g. ds9, Aladin)
try hitting the Broadcast Table
button.
You can see which other SAMP tools TOPCAT is aware of (if any)
in the bottom right panel of the main control window.
- If that worked, open the Row Subsets window
,
click on a row to highlight one of the subsets, and hit the
Broadcast Row Subset
button in that window
to send the subset.
- Check Aladin is in Select mode
.
Then whenever you move the cursor over a point in Aladin, the same
point will be highlighted in TOPCAT plots or the table viewer window
.
- You can also check the Broadcast Row Subset checkbox in the
main control window so that any time you highlight a row in TOPCAT
it will get sent to other tools.
Exercise 2: Crossmatching
This exercise uses two datasets representing objects in the same region
of sky. It performs a positional crossmatch, and uses the results to
plot some different colours against each other.
Download data
- Use VizieR in the same region again
menu item VO|VizieR Catalogue Service
- RA, Dec and Radius should be still filled in from last exercise,
otherwise, go back and enter values
- Set Maximum Row Count to 100000
(2MASS-PSC has many sources, if you don't do this the result will be
truncated)
- In Catalogue Selection panel, select
By Keyword tab, and enter "
2mass psc
" in
Keywords field, hit Search Catalogues button.
- Select II/246 and hit OK.
- This should load all the 2MASS point sources around the Pleiades -
about 52,000 sources.
(If you can't get it working, use this one:
2mass_pleiades.xml)
Crossmatch 2MASS PSC with Tycho
- Open Pair Match window,
toolbar button
- Use the default value of Sky for the matching Algorithm
- Enter "
3
" (arcsec) in the Max Error field.
- For the Table 1 and Table 2 panels, fill them in with
the table name and an RA/Dec pair for the Tycho and 2MASS tables
respectively
- Select All Matches for the Match Selection
- Click Go
View the crossmatch result graphically
- When the match is complete, a popup window will give you the
options OK or Plot Result
.
Select Plot Result.
- You should see a plot with three layers:
-
: first input table (points)
-
: second input table (points)
-
: output table (pair links)
- Each located pair is represented by a grey dumbell shape. It will
look like a grey circle at default magnification.
Zoom right in to one of the pairs (mouse wheel/right-drag/ctrl-drag).
You should be able to see that the positions are different.
- Experiment with the appearance of the layers - turn different layers
on/off, change the size/shape/colour of the markers etc.
Do something useful with the result
Having determined associations between 2MASS PSC and Tycho objects
you can make plots with some combination of 2MASS and Tycho columns,
for instance:
- Colour-magnitude plot using IR and optical colours
- 3-d colour-colour-colour plot
Assess input match radius from the result
- Examine the columns in the output table (
toolbar button).
The first lot are from the first input table,
the second lot are from the second input table.
The last column is special:
-
Separation: distance between matched points
(Q: what are the units?)
- Plot a histogram
of the Separation column.
A good way to zoom in histograms is with the mouse below or to the left
of the plot axes (zooms one axis at a time).
Can you tell from this which matches are spurious?
What would have been a good value for the matching radius?
- You might want to define a Row Subset that uses only a sub-range of the
separations you got so that you can throw out the spurious matches.
A couple of ways to do that are:
- Zoom so only a sub-range of the points are visible in the histogram
plot and use the New Subset From Visible
button
- In the Row Subsets window
define a
New Subset
with the expression
(e.g.) Separation<0.5
Or, you can re-do the match with the radius you want.
Find multiple matches in the result
- If you look back at the output table columns (
) you can
see two more special columns near the end:
-
GroupSize: number of items matched if more than one match
-
GroupID: groups together items if GroupSize>1
GroupSize>=2 means more than one match was found
(in this case, multiple 2MASS objects within the search radius
of a given Tycho object).
- Try to identify these multi-object matches.
Some ways to do that are:
- Scroll up and down in the table viewer
window
loooking at the GroupSize column
(boring for large tables)
- Sort the column: right-click on GroupSize column,
choose Sort Up
and look at the top few rows.
- Define a new Row Subset containing only large-group rows:
Open the
window and use the New Subset
button, settting Expression to GroupSize>=2
(If you can't see any multi-object matches: check that you used
All Matches and not Best Match in the
match window Match Selection field)
- When you can see one of these rows, in the table viewer window
, click on it.
That will highlight the row, and also paint a little target icon around
that point on the plot of the match result.
If you zoom in you should be able to see the multiple matches.
- Note this highlighting works the other way round too, so clicking on
a point in the plot highlights the row in the table.
It also adds a marker to the same point in any other plots that are
currently visible.
- If that's too much hard work, re-do the match with a much larger radius
(e.g. 1 arcmin).
It will be pretty obvious from the plotted result that some of the
matches are multiple.
Dropout
- Try to find a Tycho object which does not have a 2MASS
counterpart. To do this, set Join Type to 1 not 2
(or 2 not 1, depending on what order you did the match in)
in the Pair Match
window, and run the match again.
Note this option does not currently do the plot for you, but to see
the result you can add the new table (
)
to one of the existing match result plots,
or build a plot up with the required layers from scratch.
Optional: Label points
- Click the Form tab associated with one of the
Data
controls for the Tycho catalogue.
- Now add labels to each point by clicking the
button.
See a new Label
control appear in the stack.
- Tell it what label to write. Fill in the Text field
with (say)
recno
.
- See the text labels appear.
By default, you will only see the labels if they're not too crowded
together, so you may need to zoom in to see them.
If you've got this far, you can play with your own data, take a break, or
swot up for the ADQL/TAP exercise.
$Id: tcex.xhtml,v 1.10 2014/03/25 20:11:29 mbt Exp $