Skip to content

Data Sources

Each record in AuroraX is associated with a unique data source that produced it. Each data source is uniquely identified by an integer identifier in the database, or by the combination of its program, platform, and instrument type values.

Also see:

Retrieve data sources

You can retrieve all data sources, or retrieve data sources matching a certain set of filter criteria. Below are a few examples.

Example - get data sources

PyAuroraX includes the sources module and serializes data into DataSource objects.

You can retrieve ALL data sources using the "list" function with no parameters.

import pyaurorax
aurorax = pyaurorax.PyAuroraX()
sources = aurorax.search.sources.list()
print(sources)

If you want to limit the amount of information that is retrieved from AuroraX, you can specify a different format parameter, like so:

import pyaurorax
aurorax = pyaurorax.PyAuroraX()
sources = aurorax.search.sources.list(format=pyaurorax.FORMAT_BASIC_INFO)
print(sources)

If you want to retrieve data sources that match certain filter criteria, say all "Swarm" data sources, you can use the additional parameters in the "list" function.

import pyaurorax
aurorax = pyaurorax.PyAuroraX()
sources = aurorax.search.sources.list(program="swarm")
print(sources)

You can retrieve ALL data sources using the aurorax_list_sources() function with no parameters.

IDL> sources = aurorax_list_sources()
IDL> help,sources

If you want to adjust the amount of information that is retrieved from AuroraX, you can specify a format keyword, like so:

IDL> sources = aurorax_list_sources(/FORMAT_FULL_RECORD)
IDL> help,sources
IDL> sources = aurorax_list_sources(/FORMAT_IDENTIFIER_ONLY)
IDL> help,sources

If you want to retrieve data sources that match certain filter criteria, say all "Swarm" data sources, you can use additional parameters.

IDL> sources = aurorax_list_sources(program='swarm')
IDL> help,sources

You can retrieve ALL data sources using the "list" function with no parameters.

$ aurorax-cli sources list

If you want to retrieve data sources that match certain filter criteria, say all "Swarm" data sources, you can use the additional parameters in the "list" function.

$ aurorax-cli sources list --program=swarm

To view all available parameters for this command, you can look at the help list so:

$ aurorax-cli sources list --help

There are many different ways in Javascript to send a GET request, so we'll show it using a basic HTTP request. You can do this with AJAX, JQuery, Node, React, etc.

var xhr = new XMLHttpRequest();
xhr.open("GET", "https://api.aurorax.space/api/v1/data_sources");
xhr.send();
console.log(xhr.responseText)

You can also just make the request right from your browser. Copy the following URL and paste it in your browser URL bar.

https://api.aurorax.space/api/v1/data_sources