Integración de archivos y herramientas radioastronómicas en la [PDF]

cias Físicas y Científico Titular del Departamento de As- tronomía Extragaláctica del Instituto de ...... persona qu

0 downloads 3 Views 10MB Size

Recommend Stories


Comandos y herramientas PDF
If you are irritated by every rub, how will your mirror be polished? Rumi

trabajo en equipo y herramientas de mejora
Never wish them pain. That's not who you are. If they caused you pain, they must have pain inside. Wish

herramientas y tecnicas de la planeación
Love only grows by sharing. You can only have more for yourself by giving it away to others. Brian

ARCHIVOS de TEXTO en PASCAL
If you are irritated by every rub, how will your mirror be polished? Rumi

Reyes y archivos en la Corona de Aragón. Siete siglos de reglamentación y praxis archivística
I cannot do all the good that the world needs, but the world needs all the good that I can do. Jana

(1813) Análisis de la aplicación de herramientas de optimización en la industria petrolera y gasífera
Sorrow prepares you for joy. It violently sweeps everything out of your house, so that new joy can find

La información histórica en los archivos eclesiásticos
And you? When will you begin that long journey into yourself? Rumi

archivos y cultura: manual de dinamización
We can't help everyone, but everyone can help someone. Ronald Reagan

archivos, bibliotecas y museos la imagen de la virgen en los sellos
Courage doesn't always roar. Sometimes courage is the quiet voice at the end of the day saying, "I will

Idea Transcript


Universidad de Granada Departamento de Teoría de la Señal, Telemática y Telecomunicaciones

Integración de archivos y herramientas radioastronómicas en la arquitectura del Observatorio Virtual

Juan de Dios Santander Vela Departamento de Astronomía Extragaláctica, Instituto de Astrofísica de Andalucía-CSIC

Tesis Doctoral

Departamento de Teoría de la Señal, Telemática y Telecomunicaciones Universidad de Granada

Departamento de Astronomía Extragaláctica Instituto de Astrofísica de Andalucía - CSIC

Integración de archivos y herramientas radioastronómicas en la arquitectura del Observatorio Virtual Memoria presentada por:

Juan de Dios Santander Vela para optar al grado de

Doctor por la Universidad de Granada Dirigida por: Lourdes Verdes-Montenegro Atalaya (IAA-CSIC) Enrique Solano Márquez (LAEX-CAB/INTA-CSIC)

Granada, 17 de Abril de 2009

Como directores de la tesis titulada Integración de archivos y herramientas radioastronómicas en la arquitectura del Observatorio Virtual, presentada por D. Juan de Dios Santander Vela, Dña. Lourdes Verdes-Montenegro Atalaya, Doctora en Ciencias Físicas y Científico Titular del Departamento de Astronomía Extragaláctica del Instituto de Astrofísica de Andalucía (CSIC), y D. Enrique Solano Márquez, Doctor en Ciencias Matemáticas del Laboratorio de Astrofísica Estelar y Exoplanetas del Centro de Astrobiología (LAEXCAB/INTA-CSIC).

D:

Que la presente memoria, titulada Integración de archivos y herramientas radioastronómicas en la arquitectura del Observatorio Virtual ha sido realizada por D. Juan de Dios Santander Vela bajo su dirección en el Instituto de Astrofísica de Andalucía (CSIC). Esta memoria constituye la tesis que D. Juan de Dios Santander Vela presenta para optar al grado de Doctor por la Universidad de Granada. Granada, a 17 de Abril de 2009

Fdo: Lourdes Verdes-Montenegro Atalaya

Fdo: Enrique Solano Márquez

Juan de Dios Santander Vela, autor de la tesis Integración de archivos y herramientas radioastronómicas en la arquitectura del Observatorio Virtual, autoriza a que un ejemplar de la misma quede ubicada en la Biblioteca de la Escuela Superior de Ingeniería Informática de Granada.

Fdo.: Juan de Dios Santander Vela Granada, a 17 de Abril de 2009

A mi abuela, que nunca creyó vivir para ver este momento. Y a quienes siempre han estado a mi lado, incluso cuando menos me lo merecía: sé que siempre, de una forma u otra, podré contar con vosotros pase lo que pase.

Desde que orbitaron los primeros satélites, hacía unos cincuenta años, billones y cuatrillones de impulsos de información habían estado llegando del espacio, para ser almacenados para el día en que pudieran contribuir al avance del conocimiento. Sólo una minúscula fracción de esa materia prima sería tratada; pero no había manera de decir qué observación podría desear consultar algún científico, dentro de diez, o de cincuenta, o de cien años. [. . . ] Formaban parte del auténtico tesoro de la Humanidad, más valioso que todo el oro encerrado inútilmente en los sótanos de los bancos. Arthur C. Clarke (1917-2008), 2001: Una Odisea Espacial (1968).

Índice general Índice de figuras

v

Índice de cuadros

ix

Índice de listados

xi

Agradecimientos

xiii

Resumen

xix

I

Introduction: Astronomy and the Virtual Observatory

1

Introduction 1.1 Technical development of astronomy . . . . . . 1.2 Astronomy encoding="UTF-8"?> AMIGA Search byparameters results CIG Number in KIG catalogue http://nedwww.ipac.caltech.edu/cgi-bin/nph-ex_refcode?refcode=1973AISAO...8....3K Right Ascension J2000 (Leon and Verdes-Montenegro. 2003) http://amiga.iaa.csic.es:8080/FCKeditor/UserFiles/File/cig_ref2.ps Declination J2000 (Leon and Verdes-Montenegro. 2003) http://amiga.iaa.csic.es:8080/FCKeditor/UserFiles/File/cig_ref2.ps Recession Velocity (Verdes-Montenegro et al. 2005) http://amiga.iaa.csic.es:8080/FCKeditor/UserFiles/File/aa2280-04.pdf < encoding="UTF-8"?>

Figure 7.5: VOPack XSD schema listing.

113

Chapter 8

: fileName = votableUrl.split('/')[-1] else: fileName = urllib.quote(pFileName) print "Filename:", fileName curlCommand = "/usr/bin/curl -s -o "+downloadFolder+fileName+" '"+votableUrl+"'" print "Executing command:\n"+curlCommand+"\n" osCode = os.system(curlCommand) if osCode != 0: print "Download failed" else: # We succeeded # Lets convert! stiltsCommand = "./stilts tcopy "+downloadFolder+fileName stiltsCommand = stiltsCommand+" "+downloadFolder+fileName+extension stiltsCommand = stiltsCommand+" ifmt=votable ofmt=fits" print "Executing command:\n"+stiltsCommand+"\n" os.system(stiltsCommand) os.system("open "+downloadFolder)

220

CHAPTER 13. ENHANCING MASSA TO SUPPORT VO vot2fitsMD = { 'samp.name': 'movoirV2FITS', 'samp.description.text': 'Conversor de VOTable a FITS', 'movoir.version': '0.1', 'samp.icon.url': 'http://www.iaa.es/~jdsant/thesis/v2fitsIcon.png' } def convertVotable2FITS(votableUrl, pFileName): print "Entering convertVotable2FITS", votableUrl, pFileName # pdb.set_trace() # Download url 2 temp folder extension = '.fits' fileName = "" if pFileName=="": fileName = votableUrl.split('/')[-1] else: fileName = urllib.quote(pFileName) print "Filename:", fileName curlCommand = "/usr/bin/curl -s -o "+downloadFolder+fileName+" '"+votableUrl+"'" print "Executing command:\n"+curlCommand+"\n" osCode = os.system(curlCommand) if osCode != 0: print "Download failed" else: # We succeeded # Lets convert! stiltsCommand = "./stilts tcopy "+downloadFolder+fileName stiltsCommand = stiltsCommand+" "+downloadFolder+fileName+extension stiltsCommand = stiltsCommand+" ifmt=votable ofmt=fits" print "Executing command:\n"+stiltsCommand+"\n" os.system(stiltsCommand) os.system("open "+downloadFolder) # Call STILTS to convert file # Open folder

def notificationHandler(private_key, sender_id, mtype, params, extra): #pdb.set_trace() print ("notifHandler", private_key, sender_id, mtype, params, extra) if mtype == "table.load.votable": if params.has_key('url'): tableName="" if params.has_key('name'): tableName=params['name'] print "In the good branch",params['url'], tableName convertVotable2FITS(params['url'], tableName)

def callHandler(private_key, sender_id, msg_id, mtype, params, extra): # As this is a call, we should return an empty samp.result # after having processed it print ("callHandler: ", private_key, sender_id, msg_id, mtype, params, extra) if mtype == "table.load.votable": if params.has_key('url'): tableName="" if params.has_key('name'): tableName=params['name'] print "In the good branch",params['url'], tableName convertVotable2FITS(params['url'], tableName) replyMsg = {'samp.status': sampy.SAMP_STATUS_OK, 'samp.result': {}} vot2fitsClient.reply(msg_id, replyMsg) else: print "In the error branch" replyMsg = {'samp.status': sampy.SAMP_STATUS_ERROR, 'samp.result': {}, 'samp.error': {'samp.errortxt': 'No url parameter provided.'}} vot2fitsClient.reply(msg_id, replyMsg)

def responseHandler(private_key, sender_id, msg_id, response): # Response received, typically an OK response, # we should not be receiving none of these print ("Receiving response", private_key, sender_id, msg_id, response)

# Start binding behaviours vot2fitsClient = sampy.SAMPIntegratedClient(vot2fitsMD) vot2fitsClient.connect() vot2fitsClient.bindReceiveNotification("table.load.votable", notificationHandler) vot2fitsClient.bindReceiveCall("table.load.votable", callHandler) #movoirVOT2FITSconverter.vot2fitsClient.disconnect()

def notificationHandler(private_key, sender_id, mtype, params, extra): #pdb.set_trace() print ("notifHandler", private_key, sender_id, mtype, params, extra) if mtype == "table.load.votable": if params.has_key('url'): tableName="" if params.has_key('name'): tableName=params['name'] print "In the good branch",params['url'], tableName convertVotable2FITS(params['url'], tableName)

Figure 13.5: Complete listing of movoirVOT2FITSconverter.py.

def callHandler(private_key, sender_id, msg_id, mtype, params, extra): # As this is a call, we should return an empty samp.result # after having processed it print ("callHandler: ", private_key, sender_id, msg_id, mtype, params, extra) if mtype == "table.load.votable": if params.has_key('url'): tableName="" if params.has_key('name'): tableName=params['name'] print "In the good branch",params['url'], tableName convertVotable2FITS(params['url'], tableName) replyMsg = {'samp.status': sampy.SAMP_STATUS_OK, 'samp.result': {}} vot2fitsClient.reply(msg_id, replyMsg) else: print "In the error branch" replyMsg = {'samp.status': sampy.SAMP_STATUS_ERROR, 'samp.result': {}, 'samp.error': {'samp.errortxt': 'No url parameter provided.'}} vot2fitsClient.reply(msg_id, replyMsg)

registration of the module with the hub. Later, the calls and notifications to the table.load.votable message are bound, respectively, to the callHandler and notificationHandler functions, respectively. The handler functions perform a sanity check of the called parameters, such as ensuring that the message is indeed a table.load.votable message, and that it provides the mandatory url parameter. Once this is ensured, the control is passed to the convertVotable2FITS function, which performs the actual conversion. def responseHandler(private_key, sender_id, msg_id, response): # Response received, typically an OK response, # we should not be receiving none of these print ("Receiving response", private_key, sender_id, msg_id, response)

convertVotable2FITS is straightforward: the file name is obtained from the URL, a curl call for &DEC="+str(dec) csUrl = csUrl + "&SR="+str(sr) print "CS URL:", csUrl tableLoadMsg = {'samp.mtype': 'table.load.votable', 'samp.params': {'url': csUrl, 'table-id': csUrl, 'name': 'AMIGA CS clickAt response'}} print "Mensaje:", tableLoadMsg senderMeta = amigaCSclient.getMeta=" set itemsToParse to text items of sampLine set AppleScript's text item delimiters to prevTIDs if the first item of itemsToParse is equal to "samp.secret" then set samp_secret to the second item of itemsToParse end if if the first item of itemsToParse is equal to "samp.hub.xmlrpc.url" then set samp_hub_xmlrpc_url to the second item of itemsToParse end if end if end repeat

-- Prepare a message map to be broadcasted set messageMap to {|samp.mtype|:"table.load.votable", |samp.params|:{| url|:"file:///Users/jdsant/CVS/devel/astrogrid/desktop/api/examples/ workflows/sample-conesearch-input_veron.vot", name:"ASS Veron Ceti", |table-id|:"AS_SAMP#1"}} -- Broadcast the prepared message map: the result is that -- all applications able to load the VOTable would read -- that file set notified_ids to call xmlrpc {method name:"samp.hub.notifyAll", parameters: {samp_client_key, messageMap}} repeat 10000000 times get notified_ids end repeat

set table_votable_load_subscribers to {}

-- We do a VERY LONG loop in order to be able to see -- this script as a registered application -- Unregister with the hub, so that we not leave a zombie -- application call xmlrpc {method name:"samp.hub.unregister", parameters: {samp_client_key}}

-- Prepare client meta>Ingeniero en Electrónica Instituto de Astrofísica de Andalucía An additional tag has been included so that several records could be found in the same XML document.

B.3

XML validation

In the example above, we have devised an XML-based markup whose root element is the tag, which can hold inside one or more tags, each one containing , , and tags. However, as there is been no specification of the language, how can a computer make sure that the tag belongs in the tag? What can be put inside a tag? In other words, how can we specify a particular XML markup language so that computers can validate particular XML document (instances) against that specification? As originally XML was a subset of an existing markup language called Standard Generalized Markup Language (SGML), XML documents used the SGML mechanism for markup specification, called Document Type Definition (DTD). DTDs specify ELEMENTs, which are the particular tags which can appear in an XML document referencing the DTD, and ATTLISTs (attribute lists), which are the sets of attributes that can modify a particular tag. The ELEMENT declarations’ syntax also allows for specifying which tags can occur, and how many times, inside others. A DTD specifying the ELEMENTs and ATTLIST for the example above would be:

250

APPENDIX B. INTRODUCTION TO XML PERSON (NAME,BIRTHDATE?,DEGREE*,INSTITUTION*)> NAME (#PC encoding ="UTF -8"?>

C.3. VOTABLE STRUCTURE

Listing C.6: VOTable XML Schema: cont. Deprecated in Version 1.1

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.