+ All Categories
Home > Documents > VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Date post: 31-Dec-2015
Category:
Upload: frederica-dean
View: 221 times
Download: 1 times
Share this document with a friend
Popular Tags:
25
VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team
Transcript
Page 1: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

VSO Programmatic Interface

Authors:Igor Suárez Solá

Joe HourcléAlisdair Davey

VSO Team

Page 2: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

• VSO Basics– VSO GUI and underlying XML

correspondence• VSO Programmatic interface– WSDL stub generation

• Java• C

– IDL VSO– Perl interface

• VSO Advance QueryingThe documentation on this talk can be found in:

http://docs.virtualsolar.org/wsdl

Page 3: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Some Jargon

• Metadata: attributes that define a specific observation.– E.g.

– Time,instrument,observable,spectral range,provider, fileid, etc

• Data: a reference to actual data, such as a url:– E.g.

– http://vso.tuc.noao.edu/cgi-bin/drms_test/drms_export.cgi?series=aia_lev1;compress=rice;record=1700_1059741042-1059741042

Page 4: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

The VSO only has two operations:

•Metadata Query

• GetData Query

http://virtualsolar.org

Page 5: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 6: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

http://virtualsolar.org

Page 7: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 8: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 9: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Check box you want to sort by

Select view type to display additional

columns

Sorts based on order the table

column was ticked

Page 10: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 11: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 12: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 13: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 14: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.
Page 15: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

VSO programmatic interface

• Why using the VSO in a programmatic way?Because you can:– Embed VSO calls in existing code– perform complex queries– Query on fields that the GUI might not implement.– Engage in querying providers that offer specific

extended interfaces. E.g. XRT

Page 16: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

What’s a WSDL?

• Web Service Description Language– A document that describes how the message

interaction between client and server takes place.– It describes:• The message structure• Implemented operations• Protocol• Network connection (or end-point)

– The client is your program or application– The server is a VSO Core implementation

Page 17: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

How does a WSDL helps you?

• There are libraries / packages out there are able to generate code that allows you to manipulate the transaction client/server in a effective way.

• Axis2 JAVA and C• JWS• C#

Page 18: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Axis2

• http://ws.apache.org/axis2/• Generate java client stubs code:

export JAVA_HOME=/usr/local/javaexport AXIS2_HOME=/usr/local/axis2-1.5.1export PATH=$AXIS2_HOME/bin:$PATHwsdl2java.sh -s -S ./src -uri VSOi_rpc_literal.wsdl

• Generate C client stubs codeWSDL2C.sh -uri VSOi_rpc_literal.wsdl -d adb –u

• See client code inhttp://docs.virtualsolar.org/wsdl

Page 19: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Java sample code

Page 20: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

IDL VSOSSW (SolarSoftWare)

• Just two IDL routines– vso_search• To search on metadataE.g.

aia_lev1 = vso_search( '2010-09-01', '2010-09-01 01:00', inst='aia’)

– vso_get• To bring the urls for the data• E.g.

status = vso_get( aia_lev1 )

Download from http://www.lmsal.com/solarsoft/

Page 21: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

IDL VSOFurther Documentation can be found at:

http://sdo1.nascom.nasa.gov/drms/idl/vso_search.pro

Page 22: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Perl interface

• The simplest one (Native interface)– Just needs SOAP::Lite– An end point– A perl structure

• Example:my $client = SOAP::Lite-> proxy(’http://sdac.virtualsolar.org/cgi-bin/vsoi')-> uri('http://virtualsolar.org/VSO/VSOi')my $results = $client->Query({ version=>’1.0’, block => { provider=>’jsoc’, instrument=>’aia’, time=>{ start=>’20100701000000’,

end=> ’20100701000000’ } } });

Page 23: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Specific Querying• Sampling: returns records per “sampling” period

Sampling is in secondsE.g. Get records every hour– Xml:

• <sample>3600</sample>

– IDL• sample=3600

• Near querying: returns records closest to specified timeSpecify the time you want the closest product to be:

– XML:• <near>20100909001001</near>

– IDL:• near_time=“20100909001001”

– Last record• You can get the last record by setting the start time a couple of hours in the past and the end time

and near time to be now or slightly in the future.• IDL:

– This is achieve simply by setting the flag : /latest

Page 24: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Specific Querying

• Other filters– Requesting data by :• Processing level: level• Pixel resolution : pixels• Resolution: resolution• Pixel Scale: pscale• Detector: dectector• Layout : layout

Page 25: VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team.

Summary

• Programmatic interface in place

• Support for multiple programming languages

• Standardized interface

• http://docs.virtualsolar.org/wsdl


Recommended