NVO HOME
National Virtual Observatory
ICON
VIM: Visual Integration and Mining
Hosted By
CALTECH HOME

Installing and Scripting with VIM

Why not just use the web version?

VIM investigates multiple sources (sky positions). It finds catalogs and matches them to those positions. It can make Skyview cutouts or find spectra of objects at those positions. Once you find out what you want to do, you want more of it. You can either run the whole VIM -- server and browser -- on your own machine, or you use the Python API to run with more sources, more catalogs, more image cutouts, over a longer period, and automated.

Specfically, VIM can be used in three ways:

  • As a web application on a remote machine: your web browser controls data fetching and storage on a remote machine ("workbench in the cloud"). All you need is a browser. Your data is kept for 30 days, you can keep working on the same workbench, you can send the URL to colleagues. A simple password system protects the data.

  • As a web application on a local machine: By downloading and installing the VIM code, your own desktop or laptop serves the VIM web application, and the data fetching and storage is on the local machine. All data is private and on a file system that you control. The source code is open, and you can build new tools.

  • As a Python script: The VIM server can be driven by a Python script, to do proximity searches, image cutouts, etc, and the web browser used to view the results. Scripts can also be built using the browser: when the VIM web application runs, it makes a transcript of which tools were used and the parameters involved. This transcript is actually a Python program that can be used to reproduce those actions.

Installing VIM

Full instructions are at the VIM Installation Page.
Vim can be installed on:

  • a desktop or laptop running Mac, Linux (have not tried Windows)

  • or on a departmental server for use as a webapp

Requirements:

Full instructions are at the VIM Installation Page.

Scripting VIM

VIM is built as a set of "tools", each of which corresponds to a form in the web interface, and also to a line of python code that will execute the same action. There is a "workbench", which is a directory containing relevant data files. The following example is a script that was produced by an astronomer investigating a sample of active galaxies (BL Lac) objects.


# where is the VIM source code installation
vim = "/Users/roy/Documents/svn/nvo/Vim/trunk/Vim-0.95"

# where is Java
javacmd = "/usr/bin/java"

# where are the workbenches 
workdir = "/Users/roy/Work/vimcache"

# name of this workbench
benchname = "mybench"

# the next 9 lines are boilerplate
import sys
sys.path.append(vim + "/src")
sys.path.append(vim + "/src/tableToolbox")
import bench
import vimMain
from tableToolbox.tools import *
bench = bench.bench(workdir, javacmd, vim)
vimMain.vimInitBench(bench, benchname)
print "Bench is at %s/%s" % (bench.benchDir, bench.benchID)

# Read in the BL-Lac positions
sourcesURL.run(bench, sourcesURL='http://envoy5.cacr.caltech.edu:8888/web/sourceTables/bright_BL_Lac.xml')

# Make DSS cutouts for each
#skyview.run(bench, isize=300, surveylist=['DSS2B', 'DSS2R'], tablename='skyview')

# Any observed this yet with XMM?
proxsearch.run(bench, survey='XMM', sr=60./3600., tablename='xmm', verb='1', maxthreads=10)

# Any of them in ROSAT?
proxsearch.run(bench, survey='FIRST', sr=60./3600., tablename='rassfsc', verb='3', maxthreads=10)

# how about NED?
proxsearch.run(bench, survey='NED (sources)', sr=60./3600., tablename='ned', verb='1', maxthreads=10)

 

 


NSF HOMENASA HOME

Developed with the support of the National Science Foundation
under Cooperative Agreement AST0122449 with the Johns Hopkins University
The NVO is a member of the International Virtual Observatory Alliance

This NVO Application is hosted by Caltech

Member
IVOA HOME
Meet the Developers
MEET THE DEVELOPERS