{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Imports"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import pyaurorax\n",
"import pprint\n",
"import pandas as pd\n",
"\n",
"aurorax = pyaurorax.PyAuroraX()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all 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",
" 492 | \n",
" amisr | \n",
" poker flat | \n",
" ISR | \n",
" ground | \n",
" PFISR | \n",
"
\n",
" \n",
" 1 | \n",
" 494 | \n",
" amisr | \n",
" resolute bay | \n",
" ISR | \n",
" ground | \n",
" RISR-N | \n",
"
\n",
" \n",
" 2 | \n",
" 38 | \n",
" arase | \n",
" arase | \n",
" footprint | \n",
" heo | \n",
" Arase | \n",
"
\n",
" \n",
" 3 | \n",
" 175 | \n",
" auroramax | \n",
" yellowknife | \n",
" DSLR | \n",
" ground | \n",
" AuroraMAX | \n",
"
\n",
" \n",
" 6 | \n",
" 409 | \n",
" campaigns | \n",
" forgetmenot pond | \n",
" observer | \n",
" ground | \n",
" Observer at Forget-Me-Not Pond | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 192 | \n",
" 94 | \n",
" trex | \n",
" rabbit lake | \n",
" near-infrared ASI | \n",
" ground | \n",
" TREx NIR RABB | \n",
"
\n",
" \n",
" 195 | \n",
" 97 | \n",
" trex | \n",
" rabbit lake | \n",
" spectrograph | \n",
" ground | \n",
" TREx Spectrograph RABB | \n",
"
\n",
" \n",
" 199 | \n",
" 104 | \n",
" trex | \n",
" rabbit lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB RABB | \n",
"
\n",
" \n",
" 203 | \n",
" 342 | \n",
" trex | \n",
" rabbit lake | \n",
" blueline ASI | \n",
" ground | \n",
" TREx Blue RABB | \n",
"
\n",
" \n",
" 208 | \n",
" 373 | \n",
" unis/kho | \n",
" longyearbyen | \n",
" RGB ASI | \n",
" ground | \n",
" UNIS/KHO Sony A7S | \n",
"
\n",
" \n",
"
\n",
"
209 rows × 6 columns
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type \\\n",
"0 492 amisr poker flat ISR ground \n",
"1 494 amisr resolute bay ISR ground \n",
"2 38 arase arase footprint heo \n",
"3 175 auroramax yellowknife DSLR ground \n",
"6 409 campaigns forgetmenot pond observer ground \n",
".. ... ... ... ... ... \n",
"192 94 trex rabbit lake near-infrared ASI ground \n",
"195 97 trex rabbit lake spectrograph ground \n",
"199 104 trex rabbit lake RGB ASI ground \n",
"203 342 trex rabbit lake blueline ASI ground \n",
"208 373 unis/kho longyearbyen RGB ASI ground \n",
"\n",
" display_name \n",
"0 PFISR \n",
"1 RISR-N \n",
"2 Arase \n",
"3 AuroraMAX \n",
"6 Observer at Forget-Me-Not Pond \n",
".. ... \n",
"192 TREx NIR RABB \n",
"195 TREx Spectrograph RABB \n",
"199 TREx RGB RABB \n",
"203 TREx Blue RABB \n",
"208 UNIS/KHO Sony A7S \n",
"\n",
"[209 rows x 6 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = aurorax.search.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, columns=[\"identifier\", \"program\", \"platform\", \"instrument_type\", \"source_type\", \"display_name\"])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all THEMIS ASI data sources"
]
},
{
"cell_type": "code",
"execution_count": 7,
"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": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = aurorax.search.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, columns=[\"identifier\", \"program\", \"platform\", \"instrument_type\", \"source_type\", \"display_name\"])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all RGB instrument types"
]
},
{
"cell_type": "code",
"execution_count": 8,
"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",
" 86 | \n",
" rainbow | \n",
" fort simpson | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow FSIM | \n",
"
\n",
" \n",
" 2 | \n",
" 88 | \n",
" rainbow | \n",
" fort smith | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow FSMI | \n",
"
\n",
" \n",
" 1 | \n",
" 87 | \n",
" rainbow | \n",
" gillam | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow GILL | \n",
"
\n",
" \n",
" 5 | \n",
" 98 | \n",
" rainbow | \n",
" pinawa | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow PINA | \n",
"
\n",
" \n",
" 3 | \n",
" 89 | \n",
" rainbow | \n",
" rabbit lake | \n",
" RGB ASI | \n",
" ground | \n",
" Rainbow RABB | \n",
"
\n",
" \n",
" 10 | \n",
" 339 | \n",
" trex | \n",
" athabasca | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB ATHA | \n",
"
\n",
" \n",
" 4 | \n",
" 96 | \n",
" trex | \n",
" fort smith | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB FSMI | \n",
"
\n",
" \n",
" 8 | \n",
" 103 | \n",
" trex | \n",
" gillam | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB GILL | \n",
"
\n",
" \n",
" 6 | \n",
" 101 | \n",
" trex | \n",
" lucky lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB LUCK | \n",
"
\n",
" \n",
" 7 | \n",
" 102 | \n",
" trex | \n",
" pinawa | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB PINA | \n",
"
\n",
" \n",
" 9 | \n",
" 104 | \n",
" trex | \n",
" rabbit lake | \n",
" RGB ASI | \n",
" ground | \n",
" TREx RGB RABB | \n",
"
\n",
" \n",
" 11 | \n",
" 373 | \n",
" unis/kho | \n",
" longyearbyen | \n",
" RGB ASI | \n",
" ground | \n",
" UNIS/KHO Sony A7S | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" identifier program platform instrument_type source_type \\\n",
"0 86 rainbow fort simpson RGB ASI ground \n",
"2 88 rainbow fort smith RGB ASI ground \n",
"1 87 rainbow gillam RGB ASI ground \n",
"5 98 rainbow pinawa RGB ASI ground \n",
"3 89 rainbow rabbit lake RGB ASI ground \n",
"10 339 trex athabasca RGB ASI ground \n",
"4 96 trex fort smith RGB ASI ground \n",
"8 103 trex gillam RGB ASI ground \n",
"6 101 trex lucky lake RGB ASI ground \n",
"7 102 trex pinawa RGB ASI ground \n",
"9 104 trex rabbit lake RGB ASI ground \n",
"11 373 unis/kho longyearbyen RGB ASI ground \n",
"\n",
" display_name \n",
"0 Rainbow FSIM \n",
"2 Rainbow FSMI \n",
"1 Rainbow GILL \n",
"5 Rainbow PINA \n",
"3 Rainbow RABB \n",
"10 TREx RGB ATHA \n",
"4 TREx RGB FSMI \n",
"8 TREx RGB GILL \n",
"6 TREx RGB LUCK \n",
"7 TREx RGB PINA \n",
"9 TREx RGB RABB \n",
"11 UNIS/KHO Sony A7S "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = aurorax.search.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, columns=[\"identifier\", \"program\", \"platform\", \"instrument_type\", \"source_type\", \"display_name\"])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get all Swarm data sources"
]
},
{
"cell_type": "code",
"execution_count": 9,
"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": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# get data sources\n",
"sources = aurorax.search.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, columns=[\"identifier\", \"program\", \"platform\", \"instrument_type\", \"source_type\", \"display_name\"])\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": 10,
"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",
" 9 | \n",
" 265 | \n",
" dmsp | \n",
" dmsp06 | \n",
" footprint | \n",
" leo | \n",
" DMSP-06 | \n",
"
\n",
" \n",
" 12 | \n",
" 286 | \n",
" dmsp | \n",
" dmsp07 | \n",
" footprint | \n",
" leo | \n",
" DMSP-07 | \n",
"
\n",
" \n",
" 7 | \n",
" 255 | \n",
" dmsp | \n",
" dmsp08 | \n",
" footprint | \n",
" leo | \n",
" DMSP-08 | \n",
"
\n",
" \n",
" 8 | \n",
" 264 | \n",
" dmsp | \n",
" dmsp09 | \n",
" footprint | \n",
" leo | \n",
" DMSP-09 | \n",
"
\n",
" \n",
" 13 | \n",
" 287 | \n",
" dmsp | \n",
" dmsp10 | \n",
" footprint | \n",
" leo | \n",
" DMSP-10 | \n",
"
\n",
" \n",
" 14 | \n",
" 288 | \n",
" dmsp | \n",
" dmsp11 | \n",
" footprint | \n",
" leo | \n",
" DMSP-11 | \n",
"
\n",
" \n",
" 10 | \n",
" 284 | \n",
" dmsp | \n",
" dmsp12 | \n",
" footprint | \n",
" leo | \n",
" DMSP-12 | \n",
"
\n",
" \n",
" 11 | \n",
" 285 | \n",
" dmsp | \n",
" dmsp13 | \n",
" footprint | \n",
" leo | \n",
" DMSP-13 | \n",
"
\n",
" \n",
" 15 | \n",
" 289 | \n",
" dmsp | \n",
" dmsp14 | \n",
" footprint | \n",
" leo | \n",
" DMSP-14 | \n",
"
\n",
" \n",
" 16 | \n",
" 290 | \n",
" dmsp | \n",
" dmsp15 | \n",
" footprint | \n",
" leo | \n",
" DMSP-15 | \n",
"
\n",
" \n",
" 17 | \n",
" 291 | \n",
" dmsp | \n",
" dmsp16 | \n",
" footprint | \n",
" leo | \n",
" DMSP-16 | \n",
"
\n",
" \n",
" 18 | \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",
" 19 | \n",
" 293 | \n",
" dmsp | \n",
" dmsp19 | \n",
" footprint | \n",
" leo | \n",
" DMSP-19 | \n",
"
\n",
" \n",
" 30 | \n",
" 376 | \n",
" elfin | \n",
" elfina | \n",
" footprint | \n",
" leo | \n",
" ELFIN-A | \n",
"
\n",
" \n",
" 31 | \n",
" 404 | \n",
" elfin | \n",
" elfinb | \n",
" footprint | \n",
" leo | \n",
" ELFIN-B | \n",
"
\n",
" \n",
" 3 | \n",
" 32 | \n",
" epop | \n",
" epop | \n",
" footprint | \n",
" leo | \n",
" ePOP | \n",
"
\n",
" \n",
" 5 | \n",
" 70 | \n",
" fast | \n",
" fast | \n",
" footprint | \n",
" leo | \n",
" FAST | \n",
"
\n",
" \n",
" 32 | \n",
" 461 | \n",
" iss | \n",
" iss | \n",
" footprint | \n",
" leo | \n",
" ISS | \n",
"
\n",
" \n",
" 20 | \n",
" 326 | \n",
" noaa | \n",
" noaa10 | \n",
" footprint | \n",
" leo | \n",
" NOAA-10 | \n",
"
\n",
" \n",
" 21 | \n",
" 327 | \n",
" noaa | \n",
" noaa12 | \n",
" footprint | \n",
" leo | \n",
" NOAA-12 | \n",
"
\n",
" \n",
" 22 | \n",
" 328 | \n",
" noaa | \n",
" noaa14 | \n",
" footprint | \n",
" leo | \n",
" NOAA-14 | \n",
"
\n",
" \n",
" 23 | \n",
" 329 | \n",
" noaa | \n",
" noaa15 | \n",
" footprint | \n",
" leo | \n",
" NOAA-15 | \n",
"
\n",
" \n",
" 24 | \n",
" 330 | \n",
" noaa | \n",
" noaa16 | \n",
" footprint | \n",
" leo | \n",
" NOAA-16 | \n",
"
\n",
" \n",
" 25 | \n",
" 331 | \n",
" noaa | \n",
" noaa17 | \n",
" footprint | \n",
" leo | \n",
" NOAA-17 | \n",
"
\n",
" \n",
" 26 | \n",
" 332 | \n",
" noaa | \n",
" noaa18 | \n",
" footprint | \n",
" leo | \n",
" NOAA-18 | \n",
"
\n",
" \n",
" 27 | \n",
" 333 | \n",
" noaa | \n",
" noaa19 | \n",
" footprint | \n",
" leo | \n",
" NOAA-19 | \n",
"
\n",
" \n",
" 28 | \n",
" 334 | \n",
" noaa | \n",
" noaa20 | \n",
" footprint | \n",
" leo | \n",
" NOAA-20 | \n",
"
\n",
" \n",
" 29 | \n",
" 338 | \n",
" noaa | \n",
" noaa8 | \n",
" footprint | \n",
" leo | \n",
" NOAA-08 | \n",
"
\n",
" \n",
" 6 | \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",
"9 265 dmsp dmsp06 footprint leo DMSP-06\n",
"12 286 dmsp dmsp07 footprint leo DMSP-07\n",
"7 255 dmsp dmsp08 footprint leo DMSP-08\n",
"8 264 dmsp dmsp09 footprint leo DMSP-09\n",
"13 287 dmsp dmsp10 footprint leo DMSP-10\n",
"14 288 dmsp dmsp11 footprint leo DMSP-11\n",
"10 284 dmsp dmsp12 footprint leo DMSP-12\n",
"11 285 dmsp dmsp13 footprint leo DMSP-13\n",
"15 289 dmsp dmsp14 footprint leo DMSP-14\n",
"16 290 dmsp dmsp15 footprint leo DMSP-15\n",
"17 291 dmsp dmsp16 footprint leo DMSP-16\n",
"18 292 dmsp dmsp17 footprint leo DMSP-17\n",
"4 63 dmsp dmsp18 footprint leo DMSP-18\n",
"19 293 dmsp dmsp19 footprint leo DMSP-19\n",
"30 376 elfin elfina footprint leo ELFIN-A\n",
"31 404 elfin elfinb footprint leo ELFIN-B\n",
"3 32 epop epop footprint leo ePOP\n",
"5 70 fast fast footprint leo FAST\n",
"32 461 iss iss footprint leo ISS\n",
"20 326 noaa noaa10 footprint leo NOAA-10\n",
"21 327 noaa noaa12 footprint leo NOAA-12\n",
"22 328 noaa noaa14 footprint leo NOAA-14\n",
"23 329 noaa noaa15 footprint leo NOAA-15\n",
"24 330 noaa noaa16 footprint leo NOAA-16\n",
"25 331 noaa noaa17 footprint leo NOAA-17\n",
"26 332 noaa noaa18 footprint leo NOAA-18\n",
"27 333 noaa noaa19 footprint leo NOAA-19\n",
"28 334 noaa noaa20 footprint leo NOAA-20\n",
"29 338 noaa noaa8 footprint leo NOAA-08\n",
"6 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": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# source type options are \"leo\", \"heo\", \"ground\", \"lunar\", or \"event_list\"\n",
"sources = aurorax.search.sources.list(source_type=pyaurorax.search.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, columns=[\"identifier\", \"program\", \"platform\", \"instrument_type\", \"source_type\", \"display_name\"])\n",
"df.sort_values([\"program\", \"platform\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Determine the identifier for a data source"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Identifier: 3\n"
]
}
],
"source": [
"data_sources = aurorax.search.sources.list(program=\"swarm\", platform=\"swarma\", 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": 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={}, owner='dchaddoc@ucalgary.ca', maintainers=[], ephemeris_metadata_schema=[{'field_name': 'nbtrace_region', 'description': \"Region based on where the magnetic field line that passes through the spacecraft intersects the Earth's surface in the Earth's northern magnetic hemisphere\", 'data_type': 'string', 'allowed_values': ['north polar cap', 'north cusp', 'north cleft', 'north auroral oval', 'north mid-latitude', 'low latitude'], 'searchable': True}, {'field_name': 'sbtrace_region', 'description': \"Region based on where the magnetic field line that passes through the spacecraft intersects the Earth's surface in the Earth's southern magnetic hemisphere\", 'data_type': 'string', 'allowed_values': ['south polar cap', 'south cusp', 'south cleft', 'south auroral oval', 'south mid-latitude', 'low latitude'], 'searchable': True}, {'field_name': 'radial_distance', 'description': 'Distance spacecraft is from Earth in kilometers', 'data_type': 'double', 'allowed_values': [], 'searchable': True}, {'field_name': 'spacecraft_region', 'description': \"Region based on the spacecraft's position within the magnetosphere\", 'data_type': 'string', 'allowed_values': ['interplanetary medium', 'dayside magnetosheath', 'nightside magnetosheath', 'dayside magnetosphere', 'nightside magnetosphere', 'dayside plasmasphere', 'nightside plasmasphere', 'plasma sheet', 'tail lobe', 'low latitude boundary layer', 'high latitude boundary layer'], 'additional_description': 'A spacecraft can occupy only one region of this region type at any given time. The North and South Mid-Latitude regions are defined as the two bands about the Earth that extend from +30 degrees latitude to the North Auroral Oval, and -30 degrees latitude to the South Auroral Oval. The Low-Latitude is the band that extends from +30 degrees latitude to -30 degrees latitude.', 'searchable': True}, {'field_name': 'radial_trace_region', 'description': \"Region based on the location on the Earth's surface where a straight line would intersect when connecting the spacecraft and the Earth's center\", 'data_type': 'string', 'allowed_values': ['north polar cap', 'south polar cap', 'north cusp', 'south cusp', 'north cleft', 'south cleft', 'north auroral oval', 'south auroral oval', 'north mid-latitude', 'south mid-latitude', 'low latitude'], 'searchable': True}, {'field_name': 'state', 'description': 'Data is based on predictive or definitive information', 'data_type': 'string', 'allowed_values': ['predictive', 'definitive'], 'searchable': True}, {'field_name': 'tii_on', 'description': 'Indicates that the TII instrument was operational at this time.', 'data_type': 'bool', 'allowed_values': ['true', 'false'], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_vixh', 'description': 'Quality flag for Vixh data (along-track component from the horizontal sensor)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_vixv', 'description': 'Quality flag for Vixv data (along-track component from the vertical sensor)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_viy', 'description': 'Quality flag for Viy data (to the right, observer facing forward)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_viz', 'description': 'Quality flag for Viz data (downward)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}], data_product_metadata_schema=[], stats=None, format='full_record')\n"
]
}
],
"source": [
"# get data source\n",
"data_source = aurorax.search.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": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataSource(identifier=3, program=None, platform=None, instrument_type=None, source_type=None, display_name=None, metadata=None, owner=None, maintainers=None, ephemeris_metadata_schema=None, data_product_metadata_schema=None, stats=None, format='identifier_only')\n"
]
}
],
"source": [
"# as little information as possible\n",
"data_sources = aurorax.search.sources.list(program=\"swarm\",\n",
" platform=\"swarma\",\n",
" instrument_type=\"footprint\",\n",
" format=pyaurorax.search.FORMAT_IDENTIFIER_ONLY)\n",
"print(data_sources[0])"
]
},
{
"cell_type": "code",
"execution_count": 17,
"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=None, owner=None, maintainers=None, ephemeris_metadata_schema=None, data_product_metadata_schema=None, stats=None, format='basic_info')\n"
]
}
],
"source": [
"# default information\n",
"data_source = aurorax.search.sources.get_using_identifier(3, format=pyaurorax.search.FORMAT_BASIC_INFO)\n",
"print(data_source)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"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=None, maintainers=None, ephemeris_metadata_schema=None, data_product_metadata_schema=None, stats=None, format='with_metadata')\n"
]
}
],
"source": [
"# basic info, but with metadata\n",
"data_source = aurorax.search.sources.get_using_identifier(3, format=pyaurorax.search.FORMAT_BASIC_INFO_WITH_METADATA)\n",
"print(data_source)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"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': 'nbtrace_region', 'description': \"Region based on where the magnetic field line that passes through the spacecraft intersects the Earth's surface in the Earth's northern magnetic hemisphere\", 'data_type': 'string', 'allowed_values': ['north polar cap', 'north cusp', 'north cleft', 'north auroral oval', 'north mid-latitude', 'low latitude'], 'searchable': True}, {'field_name': 'sbtrace_region', 'description': \"Region based on where the magnetic field line that passes through the spacecraft intersects the Earth's surface in the Earth's southern magnetic hemisphere\", 'data_type': 'string', 'allowed_values': ['south polar cap', 'south cusp', 'south cleft', 'south auroral oval', 'south mid-latitude', 'low latitude'], 'searchable': True}, {'field_name': 'radial_distance', 'description': 'Distance spacecraft is from Earth in kilometers', 'data_type': 'double', 'allowed_values': [], 'searchable': True}, {'field_name': 'spacecraft_region', 'description': \"Region based on the spacecraft's position within the magnetosphere\", 'data_type': 'string', 'allowed_values': ['interplanetary medium', 'dayside magnetosheath', 'nightside magnetosheath', 'dayside magnetosphere', 'nightside magnetosphere', 'dayside plasmasphere', 'nightside plasmasphere', 'plasma sheet', 'tail lobe', 'low latitude boundary layer', 'high latitude boundary layer'], 'additional_description': 'A spacecraft can occupy only one region of this region type at any given time. The North and South Mid-Latitude regions are defined as the two bands about the Earth that extend from +30 degrees latitude to the North Auroral Oval, and -30 degrees latitude to the South Auroral Oval. The Low-Latitude is the band that extends from +30 degrees latitude to -30 degrees latitude.', 'searchable': True}, {'field_name': 'radial_trace_region', 'description': \"Region based on the location on the Earth's surface where a straight line would intersect when connecting the spacecraft and the Earth's center\", 'data_type': 'string', 'allowed_values': ['north polar cap', 'south polar cap', 'north cusp', 'south cusp', 'north cleft', 'south cleft', 'north auroral oval', 'south auroral oval', 'north mid-latitude', 'south mid-latitude', 'low latitude'], 'searchable': True}, {'field_name': 'state', 'description': 'Data is based on predictive or definitive information', 'data_type': 'string', 'allowed_values': ['predictive', 'definitive'], 'searchable': True}, {'field_name': 'tii_on', 'description': 'Indicates that the TII instrument was operational at this time.', 'data_type': 'bool', 'allowed_values': ['true', 'false'], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_vixh', 'description': 'Quality flag for Vixh data (along-track component from the horizontal sensor)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_vixv', 'description': 'Quality flag for Vixv data (along-track component from the vertical sensor)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_viy', 'description': 'Quality flag for Viy data (to the right, observer facing forward)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}, {'field_name': 'tii_quality_viz', 'description': 'Quality flag for Viz data (downward)', 'data_type': 'int', 'allowed_values': [], 'additional_description': 'Retrieved from TII 2Hz v0301 files. Further information and documentation found at http://efi.phys.ucalgary.ca/tii-cross-track-ion-flow-dataset-0301-released/', 'searchable': True}], data_product_metadata_schema=[], stats=None, format='full_record')\n"
]
}
],
"source": [
"# all information\n",
"data_source = aurorax.search.sources.get_using_identifier(3, format=pyaurorax.search.FORMAT_FULL_RECORD)\n",
"print(data_source)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Get statistics for a data source"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'data_product_count': 0,\n",
" 'earliest_data_product_loaded': None,\n",
" 'earliest_ephemeris_loaded': datetime.datetime(2007, 2, 18, 0, 14),\n",
" 'ephemeris_count': 11712947,\n",
" 'latest_data_product_loaded': None,\n",
" 'latest_ephemeris_loaded': datetime.datetime(2029, 5, 27, 0, 0)}\n"
]
}
],
"source": [
"# set parameters and get identifier\n",
"program = \"themis\"\n",
"platform = \"themise\"\n",
"instrument_type = \"footprint\"\n",
"data_sources = aurorax.search.sources.list(program=program, platform=platform, instrument_type=instrument_type, include_stats=True)\n",
"pprint.pprint(data_sources[0].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
}