Пример #1
0
#!/usr/bin/python

# author: Eduardo Gonzalez-Solares 	- 20070821
# mods:   Nicholas Walton		- 20080111

# this is a cross match of 2MASS against IPHAS
# so gives j,h,k and r,i, Ha fluxes for sources around IC5070 

import sys
from math import cos, radians
import time
from astrogrid import acr
from astrogrid import Applications, DSA, MySpace

# Log in
acr.login('leicester')

# Coords for IC 5070
ra, dec = 312.75, 44.37

# Output directory
output_dir = '#iphas'

# Define box bounding box
ra1 = ra - 0.25 / cos(radians(ra))
dec1 = dec - 0.25
ra2 = ra + 0.25 / cos(radians(ra))
dec2 = dec + 0.25

# Query 2MASS
twomass = DSA('ivo://wfau.roe.ac.uk/twomass-dsa/wsa/ceaApplication')
Пример #2
0
#!/usr/bin/python
"""
Executes two cone searches to NED and 2MASS and cross matches the resultant tables
retrieving the cross match outout to local disk.
"""

import time, urllib
from astrogrid import acr
from astrogrid import Applications, ConeSearch, MySpace

# Log in (we need this to save the results in VOSpace)
acr.login()

# Perform cone searches to NED and 2MASS. We are saving the results to VOSpace and these
# will be the two tables we want to cross match.

cone1 = ConeSearch("ivo://ned.ipac/Basic_Data_Near_Position")
vot1 = cone1.execute(242.811, 54.596, 0.1, saveAs='#cones/ned.vot')

cone2 = ConeSearch('ivo://wfau.roe.ac.uk/twomass-dsa/wsa')
vot2 = cone2.execute(242.811, 54.596, 0.1, dsatab='twomass_psc', saveAs='#cones/twomass_psc.vot')

# Define the cross match application to use and fill in parameters
# See http://www.star.bris.ac.uk/~mbt/stilts/sun256/secA.14.1.html for more info
app = Applications('ivo://uk.ac.starlink/stilts', 'tmatch2')

# .. inputs
app.inputs['tmatch2_in1']['value']=vot1
app.inputs['tmatch2_in2']['value']=vot2
app.inputs['tmatch2_params']['value']="2"
app.inputs['tmatch2_values1']['value']="$3 $4"