sep 6, 20082008 nvo summer school1 using iraf in the vo mike fitzpatrick, noao t he us n ational v...

17
Sep 6, 2008 2008 NVO Summer School 1 Using IRAF in the VO Mike Fitzpatrick, NOAO THE US NATIONAL VIRTUAL OBSERVATORY

Upload: jaden-bennett

Post on 27-Mar-2015

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School 1

Using IRAF in the VO

Mike Fitzpatrick, NOAO

THE US NATIONAL VIRTUAL OBSERVATORY

Page 2: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

Strategies:

• Build upon VOClient• Support scripting and compiled task development• Provide low-level toolbox utilities that enable higher-level script

task development– Let the user decide how to build the application best suited

to them

• Provide high-level demonstration science applications (scripts)– People learn from examples – Can easily modify to get slightly different behavior

• Simplify interfaces as much as possible– Don’t require detailed knowledge of VO protocols to use the data

Page 3: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

High-Level Applications - Common Features

• Uses local image footprint for query

• Object name resolved to position (plus search size)

• Arbitrary RA/DEC position (plus search size)

• Query in alternate coordinate systems (e.g. ecliptic, galactic)

– VO standard is (non-intuitive) decimal degrees

– Leverage IRAF capabilities to transform coords

• Tables output as ASCII text (others available)

Page 4: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

Low-Level (Toolbox) Applications

• Provide data access– Catalog / Image data– Raw URL (REST Services) access

cl> vocatalog GSC2.2 180.0 0.0 0.25 insys=ecliptic cl> voimage 2MASS 180.0 0.0 0.25 cl> type getData(“http://iraf.net”)

• Compiled Tasks provide– Access to services/data not suited to CL functions

• Utility functions such as– Result table manipulation (clipping, selection, conversion, etc)– Display/overlay functionality– Coordinate manipulation/conversion

Page 5: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School 5

Registry Access – Task Browser

• REGISTRY Task– Keyword search– Service Type– Bandpass– Arbitrary SQL constraint– Interactive browsing of results to further

constrain output• Very helpful when developing to find a set of

related resources you might want to offer in a task (e.g. Alternate access to a data service)

Page 6: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

High-Level Applications

• Registry Browsing (i.e. Data Discovery)

cl> registry “galaxy cluster” svc=cone bandpass=x-ray

#No ShortName ServiceType Identifier

1 BAXGALCLUS CONE ivo://nasa.heasarc/baxgalclus

2 IPCULTSOFT CONE ivo://nasa.heasarc/ipcultsoft

3 M31XMMXRAY CONE ivo://nasa.heasarc/m31xmmxray

4 NORAS CONE ivo://nasa.heasarc/noras

5 REFLEX CONE ivo://nasa.heasarc/reflex

6 WARPS CONE ivo://nasa.heasarc/warps

Page 7: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: VO-CL

Registry Query Interface str = regResolver (shortName,[svctype[,attr[,index]]])

N = nresolved ()

resource = regSearch (term [, orValues])

resource = regSearch (keywords, orValues)

resource = regSearch (sql, keywords, orValues)

resource = regSvcSearch (svcType, searchTerm, orValues)

count = regResultCount (resource)

str = regValue (resource, attr_list, resIndex)

Page 8: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: VO-CL

DAL Interface

qres = dalConeSvc (url, ra, dec, sr)

qres = dalSiapSvc (url, ra, dec, rsize[, dsize[, fmt]])

count = dalRecordCount (qres)

stat = dalGetData (qres, recnum, fname)

val = dalGet[Str|Int|Dbl] (qres, attrname, recnum)

fname = getData (url, [fname])

Page 9: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School 9

Data Access – CL Language

fname = getData (acref, [, filename])

• Provides general access to a URI– Returns a filename and so can be used as an

argument to a task– Uses default filename for opaque access to

temporary data– When accessing images, filename must be

specified with the file extension

Page 10: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: VO-CL

Sample Script Task -- Messier Object Browser

procedure messier ()

begin

int qr, stat

string svc

svc = regResolver ("dss2","sia") # Find the DSS SIA service

for (i=1; i < 111; i=i+1) { # Loop over Messier objs

sesame ("M"//i, verb+) | scan (x,y) # Resolve name to coords

qr = dalSiapSvc (svc, x, y, 0.25) # Query for data

stat = dalGetData (qr, 0, "foo.fits") # Download 1st image

display ("foo.fits[0]", 1) # Display it

}

end

Page 11: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School 11

NVO Package – Sampling of Tasks

• VOCATALOG – Cone Search • VOIMAGE – SIAP Search

– Any coord sys input, user's image, etc– Return table in variety of formats

• SESAME – Name resolver• DATASCOPE – Command-line toy version• VIZIER – Download Vizier Tables• SKYBOT – Find/Mark minor planets• FCHART - Create a finder chart

Page 12: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

Examples - FCHART

nvotools> lpar fchart

object = Object to plot

(image = "") Image name

(ra = INDEF) RA of position

(dec = INDEF) Dec of position

(inwcs = "icrs") Input coord system

(size = 0.2) Size (degrees)

(fields = "G_Lens,Xray,Radio,QSO") Objects to mark

(grid = yes) Overlay coordinate grid?

(mode = "ql")

Page 13: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

SDSS Spectral Data Access

Page 14: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

NVSS Radio Contours

NED Sources

HST Observations

Page 15: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

Query by ObjectName

Image from DSSOverlays as before

Abell 2235

Page 16: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School

IRAF Integration: NVO Package

Asteroid Detection Usingthe SkyBoT Service

Page 17: Sep 6, 20082008 NVO Summer School1 Using IRAF in the VO Mike Fitzpatrick, NOAO T HE US N ATIONAL V IRTUAL O BSERVATORY

Sep 6, 2008 2008 NVO Summer School