{ "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
identifierprogramplatforminstrument_typesource_typedisplay_name
0492amisrpoker flatISRgroundPFISR
1494amisrresolute bayISRgroundRISR-N
238arasearasefootprintheoArase
3175auroramaxyellowknifeDSLRgroundAuroraMAX
6409campaignsforgetmenot pondobservergroundObserver at Forget-Me-Not Pond
.....................
19294trexrabbit lakenear-infrared ASIgroundTREx NIR RABB
19597trexrabbit lakespectrographgroundTREx Spectrograph RABB
199104trexrabbit lakeRGB ASIgroundTREx RGB RABB
203342trexrabbit lakeblueline ASIgroundTREx Blue RABB
208373unis/kholongyearbyenRGB ASIgroundUNIS/KHO Sony A7S
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
identifierprogramplatforminstrument_typesource_typedisplay_name
044themis-asiathabascapanchromatic ASIgroundTHEMIS-ASI ATHA
1862themis-asichibougamaupanchromatic ASIgroundTHEMIS-ASI CHBG
1256themis-asiekatipanchromatic ASIgroundTHEMIS-ASI EKAT
145themis-asifort simpsonpanchromatic ASIgroundTHEMIS-ASI FSIM
1155themis-asifort smithpanchromatic ASIgroundTHEMIS-ASI FSMI
1357themis-asifort yukonpanchromatic ASIgroundTHEMIS-ASI FYKN
1964themis-asigakonapanchromatic ASIgroundTHEMIS-ASI GAKO
246themis-asigillampanchromatic ASIgroundTHEMIS-ASI GILL
2166themis-asigoose baypanchromatic ASIgroundTHEMIS-ASI GBAY
347themis-asiinuvikpanchromatic ASIgroundTHEMIS-ASI INUV
448themis-asikapuskasingpanchromatic ASIgroundTHEMIS-ASI KAPU
2065themis-asikianapanchromatic ASIgroundTHEMIS-ASI KIAN
549themis-asikuujjuaqpanchromatic ASIgroundTHEMIS-ASI KUUJ
1458themis-asimcgrathpanchromatic ASIgroundTHEMIS-ASI MCGR
2271themis-asinarsarsuaqpanchromatic ASIgroundTHEMIS-ASI NRSQ
650themis-asipinawapanchromatic ASIgroundTHEMIS-ASI PINA
1559themis-asiprince georgepanchromatic ASIgroundTHEMIS-ASI PGEO
751themis-asirankin inletpanchromatic ASIgroundTHEMIS-ASI RANK
852themis-asisanikiluaqpanchromatic ASIgroundTHEMIS-ASI SNKQ
1660themis-asisnap lakepanchromatic ASIgroundTHEMIS-ASI SNAP
953themis-asitaloyoakpanchromatic ASIgroundTHEMIS-ASI TALO
1054themis-asithe paspanchromatic ASIgroundTHEMIS-ASI TPAS
1761themis-asiwhitehorsepanchromatic ASIgroundTHEMIS-ASI WHIT
2373themis-asiyellowknifepanchromatic ASIgroundTHEMIS-ASI YKNF
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
identifierprogramplatforminstrument_typesource_typedisplay_name
086rainbowfort simpsonRGB ASIgroundRainbow FSIM
288rainbowfort smithRGB ASIgroundRainbow FSMI
187rainbowgillamRGB ASIgroundRainbow GILL
598rainbowpinawaRGB ASIgroundRainbow PINA
389rainbowrabbit lakeRGB ASIgroundRainbow RABB
10339trexathabascaRGB ASIgroundTREx RGB ATHA
496trexfort smithRGB ASIgroundTREx RGB FSMI
8103trexgillamRGB ASIgroundTREx RGB GILL
6101trexlucky lakeRGB ASIgroundTREx RGB LUCK
7102trexpinawaRGB ASIgroundTREx RGB PINA
9104trexrabbit lakeRGB ASIgroundTREx RGB RABB
11373unis/kholongyearbyenRGB ASIgroundUNIS/KHO Sony A7S
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
identifierprogramplatforminstrument_typesource_typedisplay_name
03swarmswarmafootprintleoSwarm A
129swarmswarmbfootprintleoSwarm B
230swarmswarmcfootprintleoSwarm C
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
identifierprogramplatforminstrument_typesource_typedisplay_name
9265dmspdmsp06footprintleoDMSP-06
12286dmspdmsp07footprintleoDMSP-07
7255dmspdmsp08footprintleoDMSP-08
8264dmspdmsp09footprintleoDMSP-09
13287dmspdmsp10footprintleoDMSP-10
14288dmspdmsp11footprintleoDMSP-11
10284dmspdmsp12footprintleoDMSP-12
11285dmspdmsp13footprintleoDMSP-13
15289dmspdmsp14footprintleoDMSP-14
16290dmspdmsp15footprintleoDMSP-15
17291dmspdmsp16footprintleoDMSP-16
18292dmspdmsp17footprintleoDMSP-17
463dmspdmsp18footprintleoDMSP-18
19293dmspdmsp19footprintleoDMSP-19
30376elfinelfinafootprintleoELFIN-A
31404elfinelfinbfootprintleoELFIN-B
332epopepopfootprintleoePOP
570fastfastfootprintleoFAST
32461ississfootprintleoISS
20326noaanoaa10footprintleoNOAA-10
21327noaanoaa12footprintleoNOAA-12
22328noaanoaa14footprintleoNOAA-14
23329noaanoaa15footprintleoNOAA-15
24330noaanoaa16footprintleoNOAA-16
25331noaanoaa17footprintleoNOAA-17
26332noaanoaa18footprintleoNOAA-18
27333noaanoaa19footprintleoNOAA-19
28334noaanoaa20footprintleoNOAA-20
29338noaanoaa8footprintleoNOAA-08
6106sampexsampexfootprintleoSAMPEX
03swarmswarmafootprintleoSwarm A
129swarmswarmbfootprintleoSwarm B
230swarmswarmcfootprintleoSwarm C
\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 }