Skip to main content

A python 3 client to access the RESTfull API of the SOLARNET Virtual Observatory

Project description

SOLARNET Virtual Observatory (SVO)

The SVO is a service first supported by the SOLARNET project, funded by the European Commission’s FP7 Capacities Programme under the Grant Agreement 312495. Then made operational thanks to the SOLARNET2 project, funded by the the European Union's Horizon 2020 Research and Innovation Programme under Grant Agreement 824135.

It's purpose is to collect metadata from as many solar observations as possible, especially those made thanks to the SOLARNET projects, in a common catalog and make them available to the scientific community.

A first prototype version was released in February 2016, and the operational version is available now at https://solarnet2.oma.be

The SVO code is split in several parts:

SOLARNET API python client

This package can be used as a client or as an example how to work with the API using Python 3

Example usage

from SOLARNET import datasets

# See all available datasets
for dataset in datasets:
	print(dataset)

# Get a specific dataset
aia_lev1 = datasets['AIA level 1']

# Filter the record in that dataset for June 2012 the 6th with a wavelength of 171A
filtered_aia_lev1 = aia_lev1.filter('DATE-OBS', '2012 June 6', WAVELNTH = 171)

# Display the date of observation and the wavelength in that filtered dataset
for record in filtered_aia_lev1:
	print(record.metadata['DATE-OBS'], record.metadata['WAVELNTH'])

# Download the data from a record
record = filtered_aia_lev1[0]
record.download('/tmp')

# Get the data as a BytesIO [1] without saving to disk
data = record.data()

# Open the data as a fits file (see astropy.io.fits [2])
hdus = record.HDUs()

[1] BytesIO [2] astropy.io.fits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SOLARNET-2.2.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

SOLARNET-2.2-py2.py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page