manipulating votables with topcat and stilts tom mcglynn
TRANSCRIPT
Manipulating VOTables with TOPCAT and STILTS
Tom McGlynn
What are TOPCAT and STILTS?
• STILTS is a powerful library that enables users to filter and convert tables in VOTable and other popular formats.
• TOPCAT is a user interface built on top of STILTS with extensive GUI and graphics capabilities.
• All written by Mark Taylor (Bristol University/UK) originally as part of the Starlink project.
• This demo uses TOPCAT but the underlying functionality is available through the STILTS library (in Java).
• There are some other standalone commands built on STILTS (e.g., votcopy).
• There is a TOPCAT chapter in the NVO book.
Starting TOPCAT
• In the standard distribution as command ‘topcat’
• Note capabilities to download data from various VO and other data sources.
• Remember to run setup first!• Files used in this presentation:
Download these (Twiki doesn’t let TOPCAT read them directly)– http://nvo-twiki.stsci.edu/twiki/pub/Main/NVOSS2008Sched/spocs.csv– http://nvo-twiki.stsci.edu/twiki/pub/Main/NVOSS2008Sched/spocs.xml– http://nvo-twiki.stsci.edu/twiki/pub/Main/NVOSS2008Sched/exostars.xmlThis URL can be used directly– http://heasarc.gsfc.nasa.gov/cgi-bin/W3Browse/getvotable.pl?name=messier
Starting and loading a URL
Table loaded successfully
Getting to and from VOTables
• Converting to VOTables from CSVLoad spocs.csv (available on Twiki)Save as spocs.xml (VOTable)
Can covert into many formats.• Converting VOTables to CSV
Load http://heasarc.gsfc.nasa.gov/cgi-bin/W3Browse/getvotable.pl?name=messier
Save as CSV
Portal tools may work better in handling data in non-standard formats.
Convert to a CSV file
After loading CSV convert to VOTable
The table browser
Filtering data using TOPCAT
• Show SPOCS table (view/tabledata)• Create a subset (view/row subsets/+)
– Enter name=Sunlike– Enter criterion Teff>5720 && Teff<5820 &&
log_g>4.34 && log_g<4.54 && M_H>-0.1 && M_H <0.1
– Should create subset with ~30 rows.– Show with Views/Table data/Apply Subset/Sunlike
• We can use column names or $number.• A sample can be saved in any of the supported
formats.
Creating a subset
Histograms
• Click on histogram– Note which subsets are showing and click
on all– Change column to VMAG– Note both all and sunlike data.
Histograms
Plots
• X/Y display– Ensure that full sample is shown.– Change parameters to Teff/Age– Zoom around sun location– Create new sample from plot (third box
from right)– Note region selection tool (fourth from right)
X-Y plots
Creating a subset graphically
3-D Graphics/Synthetic columns
• 3-d displays (change third axis to something interesting in box)
• Creating new columns: column metadata/+– Name = AppMag– Expr = Vmag – 5*log10(Dist/10) [note striping
error]– Note function browser– New columns can be used anywhere and
show up on output
3-D plots
Creating a new column
Correlations using TOPCAT
• Load– SPOCS table– EXOStars table
• Click on double match• Cross-correlate by position:
– Find all the SPOCS stars that have exoplanets
Cross-correlations
Viewing the correlation
Saving the correlated data.
Many more capabilities
• Direct access to VO enabled services• Density plots• Column data conversions• Hundreds of functions usable in creating
columns• PLASTIC/SAMP communication with other tasks• Joining tables• Stacked plots or spherical plots• Table statistics• …