{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Imports" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pyaurorax\n", "import pprint\n", "import pandas as pd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Retrieve metadata schema for ephemeris data" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Program: swarm\n", "Platform: swarma\n", "Instrument Type: footprint\n" ] } ], "source": [ "# set parameters\n", "program = \"swarm\"\n", "platform = \"swarma\"\n", "instrument_type = \"footprint\"\n", "print(\"%-18s%s\" % (\"Program:\", program))\n", "print(\"%-18s%s\" % (\"Platform:\", platform))\n", "print(\"%-18s%s\" % (\"Instrument Type:\", instrument_type))" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Identifier: 3\n" ] } ], "source": [ "# get identifier\n", "data_source = pyaurorax.sources.get_using_filters(program=program,\n", " platform=platform,\n", " instrument_type=instrument_type)\n", "identifier = data_source[0].identifier\n", "print(\"Identifier: %d\" % (identifier))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# get schema\n", "schema = pyaurorax.metadata.get_ephemeris_schema(data_source[0].identifier)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# View the schema" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | field_name | \n", "description | \n", "data_type | \n", "allowed_values | \n", "searchable | \n", "additional_description | \n", "
---|---|---|---|---|---|---|
0 | \n", "nbtrace_region | \n", "Region based on where the magnetic field line ... | \n", "string | \n", "[north polar cap, north cusp, north cleft, nor... | \n", "True | \n", "NaN | \n", "
1 | \n", "sbtrace_region | \n", "Region based on where the magnetic field line ... | \n", "string | \n", "[south polar cap, south cusp, south cleft, sou... | \n", "True | \n", "NaN | \n", "
2 | \n", "radial_distance | \n", "Distance spacecraft is from Earth in kilometers | \n", "double | \n", "[] | \n", "True | \n", "NaN | \n", "
3 | \n", "spacecraft_region | \n", "Region based on the spacecraft's position with... | \n", "string | \n", "[interplanetary medium, dayside magnetosheath,... | \n", "True | \n", "A spacecraft can occupy only one region of thi... | \n", "
4 | \n", "radial_trace_region | \n", "Region based on the location on the Earth's su... | \n", "string | \n", "[north polar cap, south polar cap, north cusp,... | \n", "True | \n", "NaN | \n", "
5 | \n", "state | \n", "Data is based on predictive or definitive info... | \n", "string | \n", "[predictive, definitive] | \n", "True | \n", "NaN | \n", "
6 | \n", "tii_on | \n", "Indicates that the TII instrument was operatio... | \n", "bool | \n", "[true, false] | \n", "True | \n", "Retrieved from TII 2Hz v0301 files. Further in... | \n", "
7 | \n", "tii_quality_vixh | \n", "Quality flag for Vixh data (along-track compon... | \n", "int | \n", "[] | \n", "True | \n", "Retrieved from TII 2Hz v0301 files. Further in... | \n", "
8 | \n", "tii_quality_vixv | \n", "Quality flag for Vixv data (along-track compon... | \n", "int | \n", "[] | \n", "True | \n", "Retrieved from TII 2Hz v0301 files. Further in... | \n", "
9 | \n", "tii_quality_viy | \n", "Quality flag for Viy data (to the right, obser... | \n", "int | \n", "[] | \n", "True | \n", "Retrieved from TII 2Hz v0301 files. Further in... | \n", "
10 | \n", "tii_quality_viz | \n", "Quality flag for Viz data (downward) | \n", "int | \n", "[] | \n", "True | \n", "Retrieved from TII 2Hz v0301 files. Further in... | \n", "