{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Imports"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pyaurorax\n",
"import os\n",
"import pprint\n",
"import pandas as pd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all data sources"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" identifier | \n",
" program | \n",
" platform | \n",
" instrument_type | \n",
" source_type | \n",
" display_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 38 | \n",
" arase | \n",
" arase | \n",
" footprint | \n",
" heo | \n",
" Arase | \n",
"
\n",
" \n",
" 1 | \n",
" 175 | \n",
" auroramax | \n",
" yellowknife | \n",
" DSLR | \n",
" ground | \n",
" AuroraMAX | \n",
"
\n",
" \n",
" 2 | \n",
" 39 | \n",
" cluster | \n",
" cluster1 | \n",
" footprint | \n",
" heo | \n",
" Cluster-1 | \n",
"
\n",
" \n",
" 4 | \n",
" 265 | \n",
" dmsp | \n",
" dmsp06 | \n",
" footprint | \n",
" leo | \n",
" DMSP-06 | \n",
"
\n",
" \n",
" 7 | \n",
" 286 | \n",
" dmsp | \n",
" dmsp07 | \n",
" footprint | \n",
" leo | \n",
" DMSP-07 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 104 | \n",
" 101 | \n",
" trex | \n",
" lucky lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB LUCK | \n",
"
\n",
" \n",
" 105 | \n",
" 102 | \n",
" trex | \n",
" pinawa | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB PINA | \n",
"
\n",
" \n",
" 100 | \n",
" 94 | \n",
" trex | \n",
" rabbit lake | \n",
" near-infrared ASI | \n",
" ground | \n",
" TREx NIR RABB | \n",
"
\n",
" \n",
" 103 | \n",
" 97 | \n",
" trex | \n",
" rabbit lake | \n",
" spectrograph | \n",
" ground | \n",
" TREx Spectrograph RABB | \n",
"
\n",
" \n",
" 107 | \n",
" 104 | \n",
" trex | \n",
" rabbit lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB RABB | \n",
"
\n",
" \n",
"
\n",
"
108 rows × 6 columns
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type \\\n",
"0 38 arase arase footprint heo \n",
"1 175 auroramax yellowknife DSLR ground \n",
"2 39 cluster cluster1 footprint heo \n",
"4 265 dmsp dmsp06 footprint leo \n",
"7 286 dmsp dmsp07 footprint leo \n",
".. ... ... ... ... ... \n",
"104 101 trex lucky lake RGB ASI ground \n",
"105 102 trex pinawa RGB ASI ground \n",
"100 94 trex rabbit lake near-infrared ASI ground \n",
"103 97 trex rabbit lake spectrograph ground \n",
"107 104 trex rabbit lake RGB ASI ground \n",
"\n",
" display_name \n",
"0 Arase \n",
"1 AuroraMAX \n",
"2 Cluster-1 \n",
"4 DMSP-06 \n",
"7 DMSP-07 \n",
".. ... \n",
"104 TREx RGB LUCK \n",
"105 TREx RGB PINA \n",
"100 TREx NIR RABB \n",
"103 TREx Spectrograph RABB \n",
"107 TREx RGB RABB \n",
"\n",
"[108 rows x 6 columns]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = pyaurorax.sources.list(order=\"program\")\n",
"\n",
"# show as a pandas dataframe\n",
"sources_dict = [source.__dict__ for source in sources]\n",
"df = pd.DataFrame(sources_dict, \n",
" columns=[\n",
" \"identifier\", \n",
" \"program\", \n",
" \"platform\", \n",
" \"instrument_type\", \n",
" \"source_type\", \n",
" \"display_name\"\n",
" ])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all THEMIS ASI data sources"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" identifier | \n",
" program | \n",
" platform | \n",
" instrument_type | \n",
" source_type | \n",
" display_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 44 | \n",
" themis-asi | \n",
" athabasca | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI ATHA | \n",
"
\n",
" \n",
" 18 | \n",
" 62 | \n",
" themis-asi | \n",
" chibougamau | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI CHBG | \n",
"
\n",
" \n",
" 12 | \n",
" 56 | \n",
" themis-asi | \n",
" ekati | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI EKAT | \n",
"
\n",
" \n",
" 1 | \n",
" 45 | \n",
" themis-asi | \n",
" fort simpson | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI FSIM | \n",
"
\n",
" \n",
" 11 | \n",
" 55 | \n",
" themis-asi | \n",
" fort smith | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI FSMI | \n",
"
\n",
" \n",
" 13 | \n",
" 57 | \n",
" themis-asi | \n",
" fort yukon | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI FYKN | \n",
"
\n",
" \n",
" 19 | \n",
" 64 | \n",
" themis-asi | \n",
" gakona | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI GAKO | \n",
"
\n",
" \n",
" 2 | \n",
" 46 | \n",
" themis-asi | \n",
" gillam | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI GILL | \n",
"
\n",
" \n",
" 21 | \n",
" 66 | \n",
" themis-asi | \n",
" goose bay | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI GBAY | \n",
"
\n",
" \n",
" 3 | \n",
" 47 | \n",
" themis-asi | \n",
" inuvik | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI INUV | \n",
"
\n",
" \n",
" 4 | \n",
" 48 | \n",
" themis-asi | \n",
" kapuskasing | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI KAPU | \n",
"
\n",
" \n",
" 20 | \n",
" 65 | \n",
" themis-asi | \n",
" kiana | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI KIAN | \n",
"
\n",
" \n",
" 5 | \n",
" 49 | \n",
" themis-asi | \n",
" kuujjuaq | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI KUUJ | \n",
"
\n",
" \n",
" 14 | \n",
" 58 | \n",
" themis-asi | \n",
" mcgrath | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI MCGR | \n",
"
\n",
" \n",
" 22 | \n",
" 71 | \n",
" themis-asi | \n",
" narsarsuaq | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI NRSQ | \n",
"
\n",
" \n",
" 6 | \n",
" 50 | \n",
" themis-asi | \n",
" pinawa | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI PINA | \n",
"
\n",
" \n",
" 15 | \n",
" 59 | \n",
" themis-asi | \n",
" prince george | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI PGEO | \n",
"
\n",
" \n",
" 7 | \n",
" 51 | \n",
" themis-asi | \n",
" rankin inlet | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI RANK | \n",
"
\n",
" \n",
" 8 | \n",
" 52 | \n",
" themis-asi | \n",
" sanikiluaq | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI SNKQ | \n",
"
\n",
" \n",
" 16 | \n",
" 60 | \n",
" themis-asi | \n",
" snap lake | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI SNAP | \n",
"
\n",
" \n",
" 9 | \n",
" 53 | \n",
" themis-asi | \n",
" taloyoak | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI TALO | \n",
"
\n",
" \n",
" 10 | \n",
" 54 | \n",
" themis-asi | \n",
" the pas | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI TPAS | \n",
"
\n",
" \n",
" 17 | \n",
" 61 | \n",
" themis-asi | \n",
" whitehorse | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI WHIT | \n",
"
\n",
" \n",
" 23 | \n",
" 73 | \n",
" themis-asi | \n",
" yellowknife | \n",
" panchromatic ASI | \n",
" ground | \n",
" THEMIS-ASI YKNF | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type \\\n",
"0 44 themis-asi athabasca panchromatic ASI ground \n",
"18 62 themis-asi chibougamau panchromatic ASI ground \n",
"12 56 themis-asi ekati panchromatic ASI ground \n",
"1 45 themis-asi fort simpson panchromatic ASI ground \n",
"11 55 themis-asi fort smith panchromatic ASI ground \n",
"13 57 themis-asi fort yukon panchromatic ASI ground \n",
"19 64 themis-asi gakona panchromatic ASI ground \n",
"2 46 themis-asi gillam panchromatic ASI ground \n",
"21 66 themis-asi goose bay panchromatic ASI ground \n",
"3 47 themis-asi inuvik panchromatic ASI ground \n",
"4 48 themis-asi kapuskasing panchromatic ASI ground \n",
"20 65 themis-asi kiana panchromatic ASI ground \n",
"5 49 themis-asi kuujjuaq panchromatic ASI ground \n",
"14 58 themis-asi mcgrath panchromatic ASI ground \n",
"22 71 themis-asi narsarsuaq panchromatic ASI ground \n",
"6 50 themis-asi pinawa panchromatic ASI ground \n",
"15 59 themis-asi prince george panchromatic ASI ground \n",
"7 51 themis-asi rankin inlet panchromatic ASI ground \n",
"8 52 themis-asi sanikiluaq panchromatic ASI ground \n",
"16 60 themis-asi snap lake panchromatic ASI ground \n",
"9 53 themis-asi taloyoak panchromatic ASI ground \n",
"10 54 themis-asi the pas panchromatic ASI ground \n",
"17 61 themis-asi whitehorse panchromatic ASI ground \n",
"23 73 themis-asi yellowknife panchromatic ASI ground \n",
"\n",
" display_name \n",
"0 THEMIS-ASI ATHA \n",
"18 THEMIS-ASI CHBG \n",
"12 THEMIS-ASI EKAT \n",
"1 THEMIS-ASI FSIM \n",
"11 THEMIS-ASI FSMI \n",
"13 THEMIS-ASI FYKN \n",
"19 THEMIS-ASI GAKO \n",
"2 THEMIS-ASI GILL \n",
"21 THEMIS-ASI GBAY \n",
"3 THEMIS-ASI INUV \n",
"4 THEMIS-ASI KAPU \n",
"20 THEMIS-ASI KIAN \n",
"5 THEMIS-ASI KUUJ \n",
"14 THEMIS-ASI MCGR \n",
"22 THEMIS-ASI NRSQ \n",
"6 THEMIS-ASI PINA \n",
"15 THEMIS-ASI PGEO \n",
"7 THEMIS-ASI RANK \n",
"8 THEMIS-ASI SNKQ \n",
"16 THEMIS-ASI SNAP \n",
"9 THEMIS-ASI TALO \n",
"10 THEMIS-ASI TPAS \n",
"17 THEMIS-ASI WHIT \n",
"23 THEMIS-ASI YKNF "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = pyaurorax.sources.list(program=\"themis-asi\")\n",
"\n",
"# show as a pandas dataframe\n",
"sources_dict = [source.__dict__ for source in sources]\n",
"df = pd.DataFrame(sources_dict, \n",
" columns=[\n",
" \"identifier\", \n",
" \"program\", \n",
" \"platform\", \n",
" \"instrument_type\", \n",
" \"source_type\", \n",
" \"display_name\"\n",
" ])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all RGB instrument types"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" identifier | \n",
" program | \n",
" platform | \n",
" instrument_type | \n",
" source_type | \n",
" display_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 85 | \n",
" rainbow | \n",
" athabasca | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow ATHA | \n",
"
\n",
" \n",
" 1 | \n",
" 86 | \n",
" rainbow | \n",
" fort simpson | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow FSIM | \n",
"
\n",
" \n",
" 3 | \n",
" 88 | \n",
" rainbow | \n",
" fort smith | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow FSMI | \n",
"
\n",
" \n",
" 2 | \n",
" 87 | \n",
" rainbow | \n",
" gillam | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow GILL | \n",
"
\n",
" \n",
" 7 | \n",
" 98 | \n",
" rainbow | \n",
" pinawa | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow PINA | \n",
"
\n",
" \n",
" 4 | \n",
" 89 | \n",
" rainbow | \n",
" rabbit lake | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow RABB | \n",
"
\n",
" \n",
" 8 | \n",
" 99 | \n",
" rainbow | \n",
" resolute bay | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow RESU | \n",
"
\n",
" \n",
" 5 | \n",
" 90 | \n",
" rainbow | \n",
" saskatoon | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow SASK | \n",
"
\n",
" \n",
" 9 | \n",
" 100 | \n",
" rainbow | \n",
" yellowknife | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow YKNF | \n",
"
\n",
" \n",
" 6 | \n",
" 96 | \n",
" trex | \n",
" fort smith | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB FSMI | \n",
"
\n",
" \n",
" 12 | \n",
" 103 | \n",
" trex | \n",
" gillam | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB GILL | \n",
"
\n",
" \n",
" 10 | \n",
" 101 | \n",
" trex | \n",
" lucky lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB LUCK | \n",
"
\n",
" \n",
" 11 | \n",
" 102 | \n",
" trex | \n",
" pinawa | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB PINA | \n",
"
\n",
" \n",
" 13 | \n",
" 104 | \n",
" trex | \n",
" rabbit lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB RABB | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type \\\n",
"0 85 rainbow athabasca RGB ASI ground \n",
"1 86 rainbow fort simpson RGB ASI ground \n",
"3 88 rainbow fort smith RGB ASI ground \n",
"2 87 rainbow gillam RGB ASI ground \n",
"7 98 rainbow pinawa RGB ASI ground \n",
"4 89 rainbow rabbit lake RGB ASI ground \n",
"8 99 rainbow resolute bay RGB ASI ground \n",
"5 90 rainbow saskatoon RGB ASI ground \n",
"9 100 rainbow yellowknife RGB ASI ground \n",
"6 96 trex fort smith RGB ASI ground \n",
"12 103 trex gillam RGB ASI ground \n",
"10 101 trex lucky lake RGB ASI ground \n",
"11 102 trex pinawa RGB ASI ground \n",
"13 104 trex rabbit lake RGB ASI ground \n",
"\n",
" display_name \n",
"0 Rainbow ATHA \n",
"1 Rainbow FSIM \n",
"3 Rainbow FSMI \n",
"2 Rainbow GILL \n",
"7 Rainbow PINA \n",
"4 Rainbow RABB \n",
"8 Rainbow RESU \n",
"5 Rainbow SASK \n",
"9 Rainbow YKNF \n",
"6 TREx RGB FSMI \n",
"12 TREx RGB GILL \n",
"10 TREx RGB LUCK \n",
"11 TREx RGB PINA \n",
"13 TREx RGB RABB "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = pyaurorax.sources.list(instrument_type=\"RGB ASI\")\n",
"\n",
"# show as a pandas dataframe\n",
"sources_dict = [source.__dict__ for source in sources]\n",
"df = pd.DataFrame(sources_dict, \n",
" columns=[\n",
" \"identifier\", \n",
" \"program\", \n",
" \"platform\", \n",
" \"instrument_type\", \n",
" \"source_type\", \n",
" \"display_name\"\n",
" ])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all Swarm data sources"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" identifier | \n",
" program | \n",
" platform | \n",
" instrument_type | \n",
" source_type | \n",
" display_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 3 | \n",
" swarm | \n",
" swarma | \n",
" footprint | \n",
" leo | \n",
" Swarm A | \n",
"
\n",
" \n",
" 1 | \n",
" 29 | \n",
" swarm | \n",
" swarmb | \n",
" footprint | \n",
" leo | \n",
" Swarm B | \n",
"
\n",
" \n",
" 2 | \n",
" 30 | \n",
" swarm | \n",
" swarmc | \n",
" footprint | \n",
" leo | \n",
" Swarm C | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type display_name\n",
"0 3 swarm swarma footprint leo Swarm A\n",
"1 29 swarm swarmb footprint leo Swarm B\n",
"2 30 swarm swarmc footprint leo Swarm C"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = pyaurorax.sources.list(program=\"swarm\")\n",
"\n",
"# show as a pandas dataframe\n",
"sources_dict = [source.__dict__ for source in sources]\n",
"df = pd.DataFrame(sources_dict, \n",
" columns=[\n",
" \"identifier\", \n",
" \"program\", \n",
" \"platform\", \n",
" \"instrument_type\", \n",
" \"source_type\", \n",
" \"display_name\"\n",
" ])\n",
"df.sort_values([\"program\", \"platform\", \"instrument_type\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all low-earth orbit data sources (LEO)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" identifier | \n",
" program | \n",
" platform | \n",
" instrument_type | \n",
" source_type | \n",
" display_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 8 | \n",
" 265 | \n",
" dmsp | \n",
" dmsp06 | \n",
" footprint | \n",
" leo | \n",
" DMSP-06 | \n",
"
\n",
" \n",
" 11 | \n",
" 286 | \n",
" dmsp | \n",
" dmsp07 | \n",
" footprint | \n",
" leo | \n",
" DMSP-07 | \n",
"
\n",
" \n",
" 6 | \n",
" 255 | \n",
" dmsp | \n",
" dmsp08 | \n",
" footprint | \n",
" leo | \n",
" DMSP-08 | \n",
"
\n",
" \n",
" 7 | \n",
" 264 | \n",
" dmsp | \n",
" dmsp09 | \n",
" footprint | \n",
" leo | \n",
" DMSP-09 | \n",
"
\n",
" \n",
" 12 | \n",
" 287 | \n",
" dmsp | \n",
" dmsp10 | \n",
" footprint | \n",
" leo | \n",
" DMSP-10 | \n",
"
\n",
" \n",
" 13 | \n",
" 288 | \n",
" dmsp | \n",
" dmsp11 | \n",
" footprint | \n",
" leo | \n",
" DMSP-11 | \n",
"
\n",
" \n",
" 9 | \n",
" 284 | \n",
" dmsp | \n",
" dmsp12 | \n",
" footprint | \n",
" leo | \n",
" DMSP-12 | \n",
"
\n",
" \n",
" 10 | \n",
" 285 | \n",
" dmsp | \n",
" dmsp13 | \n",
" footprint | \n",
" leo | \n",
" DMSP-13 | \n",
"
\n",
" \n",
" 14 | \n",
" 289 | \n",
" dmsp | \n",
" dmsp14 | \n",
" footprint | \n",
" leo | \n",
" DMSP-14 | \n",
"
\n",
" \n",
" 15 | \n",
" 290 | \n",
" dmsp | \n",
" dmsp15 | \n",
" footprint | \n",
" leo | \n",
" DMSP-15 | \n",
"
\n",
" \n",
" 16 | \n",
" 291 | \n",
" dmsp | \n",
" dmsp16 | \n",
" footprint | \n",
" leo | \n",
" DMSP-16 | \n",
"
\n",
" \n",
" 17 | \n",
" 292 | \n",
" dmsp | \n",
" dmsp17 | \n",
" footprint | \n",
" leo | \n",
" DMSP-17 | \n",
"
\n",
" \n",
" 4 | \n",
" 63 | \n",
" dmsp | \n",
" dmsp18 | \n",
" footprint | \n",
" leo | \n",
" DMSP-18 | \n",
"
\n",
" \n",
" 18 | \n",
" 293 | \n",
" dmsp | \n",
" dmsp19 | \n",
" footprint | \n",
" leo | \n",
" DMSP-19 | \n",
"
\n",
" \n",
" 3 | \n",
" 32 | \n",
" epop | \n",
" epop | \n",
" footprint | \n",
" leo | \n",
" ePOP | \n",
"
\n",
" \n",
" 19 | \n",
" 326 | \n",
" noaa | \n",
" noaa10 | \n",
" footprint | \n",
" leo | \n",
" NOAA-10 | \n",
"
\n",
" \n",
" 20 | \n",
" 327 | \n",
" noaa | \n",
" noaa12 | \n",
" footprint | \n",
" leo | \n",
" NOAA-12 | \n",
"
\n",
" \n",
" 21 | \n",
" 328 | \n",
" noaa | \n",
" noaa14 | \n",
" footprint | \n",
" leo | \n",
" NOAA-14 | \n",
"
\n",
" \n",
" 22 | \n",
" 329 | \n",
" noaa | \n",
" noaa15 | \n",
" footprint | \n",
" leo | \n",
" NOAA-15 | \n",
"
\n",
" \n",
" 23 | \n",
" 330 | \n",
" noaa | \n",
" noaa16 | \n",
" footprint | \n",
" leo | \n",
" NOAA-16 | \n",
"
\n",
" \n",
" 24 | \n",
" 331 | \n",
" noaa | \n",
" noaa17 | \n",
" footprint | \n",
" leo | \n",
" NOAA-17 | \n",
"
\n",
" \n",
" 25 | \n",
" 332 | \n",
" noaa | \n",
" noaa18 | \n",
" footprint | \n",
" leo | \n",
" NOAA-18 | \n",
"
\n",
" \n",
" 26 | \n",
" 333 | \n",
" noaa | \n",
" noaa19 | \n",
" footprint | \n",
" leo | \n",
" NOAA-19 | \n",
"
\n",
" \n",
" 27 | \n",
" 334 | \n",
" noaa | \n",
" noaa20 | \n",
" footprint | \n",
" leo | \n",
" NOAA-20 | \n",
"
\n",
" \n",
" 5 | \n",
" 106 | \n",
" sampex | \n",
" sampex | \n",
" footprint | \n",
" leo | \n",
" SAMPEX | \n",
"
\n",
" \n",
" 0 | \n",
" 3 | \n",
" swarm | \n",
" swarma | \n",
" footprint | \n",
" leo | \n",
" Swarm A | \n",
"
\n",
" \n",
" 1 | \n",
" 29 | \n",
" swarm | \n",
" swarmb | \n",
" footprint | \n",
" leo | \n",
" Swarm B | \n",
"
\n",
" \n",
" 2 | \n",
" 30 | \n",
" swarm | \n",
" swarmc | \n",
" footprint | \n",
" leo | \n",
" Swarm C | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type display_name\n",
"8 265 dmsp dmsp06 footprint leo DMSP-06\n",
"11 286 dmsp dmsp07 footprint leo DMSP-07\n",
"6 255 dmsp dmsp08 footprint leo DMSP-08\n",
"7 264 dmsp dmsp09 footprint leo DMSP-09\n",
"12 287 dmsp dmsp10 footprint leo DMSP-10\n",
"13 288 dmsp dmsp11 footprint leo DMSP-11\n",
"9 284 dmsp dmsp12 footprint leo DMSP-12\n",
"10 285 dmsp dmsp13 footprint leo DMSP-13\n",
"14 289 dmsp dmsp14 footprint leo DMSP-14\n",
"15 290 dmsp dmsp15 footprint leo DMSP-15\n",
"16 291 dmsp dmsp16 footprint leo DMSP-16\n",
"17 292 dmsp dmsp17 footprint leo DMSP-17\n",
"4 63 dmsp dmsp18 footprint leo DMSP-18\n",
"18 293 dmsp dmsp19 footprint leo DMSP-19\n",
"3 32 epop epop footprint leo ePOP\n",
"19 326 noaa noaa10 footprint leo NOAA-10\n",
"20 327 noaa noaa12 footprint leo NOAA-12\n",
"21 328 noaa noaa14 footprint leo NOAA-14\n",
"22 329 noaa noaa15 footprint leo NOAA-15\n",
"23 330 noaa noaa16 footprint leo NOAA-16\n",
"24 331 noaa noaa17 footprint leo NOAA-17\n",
"25 332 noaa noaa18 footprint leo NOAA-18\n",
"26 333 noaa noaa19 footprint leo NOAA-19\n",
"27 334 noaa noaa20 footprint leo NOAA-20\n",
"5 106 sampex sampex footprint leo SAMPEX\n",
"0 3 swarm swarma footprint leo Swarm A\n",
"1 29 swarm swarmb footprint leo Swarm B\n",
"2 30 swarm swarmc footprint leo Swarm C"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# source type options are \"leo\", \"heo\", \"ground\", \"lunar\", or \"event_list\"\n",
"sources = pyaurorax.sources.list(source_type=pyaurorax.SOURCE_TYPE_LEO)\n",
"\n",
"# show as a pandas dataframe\n",
"sources_dict = [source.__dict__ for source in sources]\n",
"df = pd.DataFrame(sources_dict, \n",
" columns=[\n",
" \"identifier\", \n",
" \"program\", \n",
" \"platform\", \n",
" \"instrument_type\", \n",
" \"source_type\", \n",
" \"display_name\"\n",
" ])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Determine the identifier for a data source"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Identifier: 3\n"
]
}
],
"source": [
"data_sources = pyaurorax.sources.list(program=\"swarm\",\n",
" platform=\"swarma\",\n",
" instrument_type=\"footprint\")\n",
"identifier = data_sources[0].identifier\n",
"print(\"Identifier: %d\" % (identifier))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get data source using identifier"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=3, program='swarm', platform='swarma', instrument_type='footprint', source_type='leo', display_name='Swarm A', metadata={}, owner='dchaddoc@ucalgary.ca', maintainers=[], ephemeris_metadata_schema=[{'field_name': 'nbt...}], data_product_metadata_schema=[])\n"
]
}
],
"source": [
"# get data source\n",
"data_source = pyaurorax.sources.get_using_identifier(3)\n",
"pprint.pprint(data_source)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get data source information with different levels of information\n",
"\n",
"You can retrieve different amounts of information about data sources. The default is `pyaurorax.FORMAT_BASIC_INFO` which provides some basic information, there are also format types for smaller or larger amounts of information."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=3)\n"
]
}
],
"source": [
"# as little information as possible\n",
"data_sources = pyaurorax.sources.list(program=\"swarm\",\n",
" platform=\"swarma\",\n",
" instrument_type=\"footprint\",\n",
" format=pyaurorax.FORMAT_IDENTIFIER_ONLY)\n",
"print(data_sources[0])"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=3, program='swarm', platform='swarma', instrument_type='footprint', source_type='leo', display_name='Swarm A')\n"
]
}
],
"source": [
"# default information\n",
"data_source = pyaurorax.sources.get_using_identifier(3, format=pyaurorax.FORMAT_BASIC_INFO)\n",
"print(data_source)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=3, program='swarm', platform='swarma', instrument_type='footprint', source_type='leo', display_name='Swarm A', metadata={})\n"
]
}
],
"source": [
"# basic info, but with metadata\n",
"data_source = pyaurorax.sources.get_using_identifier(3, format=pyaurorax.FORMAT_BASIC_INFO_WITH_METADATA)\n",
"print(data_source)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=3, program='swarm', platform='swarma', instrument_type='footprint', source_type='leo', display_name='Swarm A', metadata={}, owner='dchaddoc@ucalgary.ca', maintainers=[], ephemeris_metadata_schema=[{'field_name': 'nbt...}], data_product_metadata_schema=[])\n"
]
}
],
"source": [
"# all information\n",
"data_source = pyaurorax.sources.get_using_identifier(3, format=pyaurorax.FORMAT_FULL_RECORD)\n",
"print(data_source)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get statistics for a data source"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=37, program='themis', platform='themise', instrument_type='footprint', source_type='heo', display_name='THEMIS-E', metadata={}, owner='dchaddoc@ucalgary.ca', maintainers=[], ephemeris_metadata_schema=[{'field_name': 'nbt...}], data_product_metadata_schema=[])\n"
]
}
],
"source": [
"# set parameters and get identifier\n",
"program = \"themis\"\n",
"platform = \"themise\"\n",
"instrument_type = \"footprint\"\n",
"data_sources = pyaurorax.sources.list(program=program,\n",
" platform=platform,\n",
" instrument_type=instrument_type)\n",
"print(data_sources[0])"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSourceStatistics(data_source=DataSource(identifier=3), earliest_ephemeris_loaded=datetime.datetime(2013, 11, 26, 0, 0), latest_ephemeris_loaded=datetime.datetime(2021, 12, 10, 23, 59), ephemeris_count=4229280, earliest_data_product_loaded=None, latest_data_product_loaded=None, data_product_count=0)\n",
"\n",
"{'data_product_count': 0,\n",
" 'data_source': DataSource(identifier=3),\n",
" 'earliest_data_product_loaded': None,\n",
" 'earliest_ephemeris_loaded': datetime.datetime(2013, 11, 26, 0, 0),\n",
" 'ephemeris_count': 4229280,\n",
" 'latest_data_product_loaded': None,\n",
" 'latest_ephemeris_loaded': datetime.datetime(2021, 12, 10, 23, 59)}\n"
]
}
],
"source": [
"# get stats\n",
"stats = pyaurorax.sources.get_stats(identifier, format=pyaurorax.FORMAT_IDENTIFIER_ONLY)\n",
"print(stats)\n",
"print()\n",
"pprint.pprint(stats.__dict__)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
}
},
"nbformat": 4,
"nbformat_minor": 4
}