time.sleep(10)
	
if job2.status() == 'ERROR':
	print 'Error querying IPHAS database'
	print job2.results()[0]
	sys.exit()
	
print 'IPHAS Query: ',job1.status()

m = MySpace()

# Perform Xmatch using 1.5 arcsec radius

# this uses the TopCat STILTS library to perform the cross match

app = Applications('ivo://uk.ac.starlink/stilts', 'tmatch2')
app.inputs['tmatch2_in1']['value'] = '%s/iphas.vot' % output_dir
app.inputs['tmatch2_in2']['value'] = '%s/twomass.vot' % output_dir
app.inputs['tmatch2_values1']['value'] = 'ra dec'
app.inputs['tmatch2_values2']['value'] = 'ra dec'
app.inputs['tmatch2_params']['value'] = '1.5'
app.inputs['tmatch2_ifmt1']['value'] = '(auto)'
app.inputs['tmatch2_ifmt2']['value'] = '(auto)'
app.inputs['tmatch2_ofmt']['value'] = 'vot'

app.inputs.pop('tmatch2_icmd1')
app.inputs.pop('tmatch2_icmd2')
app.inputs.pop('tmatch2_ocmd')

app.outputs['tmatch2_out']['value'] = '%s/iphas_twomass.vot' % output_dir
job = app.submit()
Exemple #2
0
#!/usr/bin/python
"""
Convert a file from one format to another using STILTS.
"""

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

acr.login()

# Perform a cone search to NED to obtain a VOTable
cone = ConeSearch("ivo://ned.ipac/Basic_Data_Near_Position")
vot = cone.execute(242.811, 54.596, 0.1, saveAs='#cones/ned.vot')

# Use tcopy (STILTS) to do the conversion
app = Applications('ivo://uk.ac.starlink/stilts','tcopy')

app.inputs['tcopy_in']['value']='#cones/ned.vot'
app.inputs['tcopy_ifmt']['value']='VOTABLE'
app.inputs['tcopy_ofmt']['value']="FITS"

app.outputs['tcopy_out']['value']='#cones/ned.fits'

res=app.submit()
Exemple #3
0
# 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"
app.inputs['tmatch2_values2']['value']="ra dec"
app.inputs['tmatch2_ofmt']['value'] = 'votable-tabledata'

# .. outputs
app.outputs['tmatch2_out']['value']='#cones/ned2mass-xmatch.vot'

# .. remove unncessary (optional) parameters
app.inputs.pop('tmatch2_icmd1')
app.inputs.pop('tmatch2_icmd2')
Exemple #4
0
# 3x3 ``all-ground'' convolution mask with FWHM = 2 pixels.
1 2 1
2 4 2
1 2 1
"""

# We write the image to MySpace
m = MySpace()
m.savefile(image, '#sextractor/image.fits')

# Application ID. This is the name of the application we are going to run.
# It can be obtained from a registry search.
id = 'ivo://org.astrogrid/SExtractor'

# We fill in the application parameters
app = Applications(id)

app.inputs['ANALYSIS_THRESH']['value']=1.5
app.inputs['IMAGE_BAND']['value']='R'
app.inputs['MAG_ZEROPOINT']['value']=25.0
app.inputs['SEEING_FWHM']['value']=1.2

app.inputs['PARAMETERS_NAME']['value']=params
app.inputs['FILTER_NAME']['value']=filter
app.inputs['config_file']['value']=config

app.inputs['DetectionImage']['value'] = '#sextractor/image.fits'
app.inputs['PhotoImage']['value'] = '#sextractor/image.fits'

app.outputs['CATALOG_NAME']['value'] = '#sextractor/image_cat.fits'