250 likes | 428 Views
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 Querying.
E N D
VSO Programmatic Interface Authors: Igor SuárezSolá 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 Querying The documentation on this talk can be found in: http://docs.virtualsolar.org/wsdl
Some Jargon • Metadata: attributes that define a specific observation. • E.g. • Time,instrument,observable,spectralrange,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
The VSO only has two operations: • Metadata Query • GetData Query http://virtualsolar.org
Select view type to display additional columns Sorts based on order the table column was ticked Check box you want to sort by
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
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
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#
Axis2 • http://ws.apache.org/axis2/ • Generate java client stubs code: export JAVA_HOME=/usr/local/java export AXIS2_HOME=/usr/local/axis2-1.5.1 export PATH=$AXIS2_HOME/bin:$PATH wsdl2java.sh -s -S ./src -uriVSOi_rpc_literal.wsdl • Generate C client stubs code WSDL2C.sh -uriVSOi_rpc_literal.wsdl -dadb –u • See client code in http://docs.virtualsolar.org/wsdl
IDL VSOSSW (SolarSoftWare) • Just two IDL routines • vso_search • To search on metadata E.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/
IDL VSO Further Documentation can be found at: http://sdo1.nascom.nasa.gov/drms/idl/vso_search.pro
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’ } } });
Specific Querying • Sampling: returns records per “sampling” period Sampling is in seconds E.g. Get records every hour • Xml: • <sample>3600</sample> • IDL • sample=3600 • Near querying: returns records closest to specified time Specify 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
Specific Querying • Other filters • Requesting data by : • Processing level: level • Pixel resolution : pixels • Resolution: resolution • Pixel Scale: pscale • Detector: dectector • Layout : layout
Summary • Programmatic interface in place • Support for multiple programming languages • Standardized interface • http://docs.virtualsolar.org/wsdl