{ "cells": [ { "cell_type": "markdown", "id": "0d8a93ab", "metadata": {}, "source": [ "# Imports" ] }, { "cell_type": "code", "execution_count": 23, "id": "b1fcb6ed", "metadata": {}, "outputs": [], "source": [ "import pyaurorax\n", "import datetime\n", "import pprint\n", "import pandas as pd" ] }, { "cell_type": "markdown", "id": "ebfc94e7", "metadata": {}, "source": [ "# Search for conjunctions" ] }, { "cell_type": "code", "execution_count": 5, "id": "cd6ba6e4", "metadata": {}, "outputs": [], "source": [ "# search for conjunctions between any THEMIS-ASI intrument and any Swarm instrument\n", "start = datetime.datetime(2020, 1, 1, 0, 0, 0)\n", "end = datetime.datetime(2020, 1, 1, 6, 59, 59)\n", "ground = [\n", " {\"programs\": [\"themis-asi\"]}\n", "]\n", "space = [\n", " {\"programs\": [\"swarm\"]}\n", "]\n", "distance = 500" ] }, { "cell_type": "code", "execution_count": 3, "id": "61ecab23", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2022-01-14 01:11:55.871260] Search object created\n", "[2022-01-14 01:11:55.978327] Request submitted\n", "[2022-01-14 01:11:55.978520] Request ID: 911be71f-589b-4c6a-9a7d-217805c7e2f0\n", "[2022-01-14 01:11:55.978535] Request details available at: https://api.aurorax.space/api/v1/conjunctions/requests/911be71f-589b-4c6a-9a7d-217805c7e2f0\n", "[2022-01-14 01:11:55.979484] Waiting for data ...\n", "[2022-01-14 01:11:57.054873] Checking for data ...\n", "[2022-01-14 01:11:57.119220] Data is now available\n", "[2022-01-14 01:11:57.119337] Retrieving data ...\n", "[2022-01-14 01:11:57.241491] Retrieved 373.6 kB of data containing 49 records\n" ] } ], "source": [ "# perform search\n", "s = pyaurorax.conjunctions.search(start,\n", " end,\n", " distance,\n", " ground=ground,\n", " space=space,\n", " verbose=True)" ] }, { "cell_type": "code", "execution_count": 4, "id": "4bf62a96", "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
conjunction_typestartenddata_sourcesmin_distancemax_distanceevents
43nbtrace2020-01-01 00:08:002020-01-01 00:09:00[DataSource(identifier=53, program='themis-asi...206.588207260.819127[{'conjunction_type': 'nbtrace', 'e1_source': ...
15nbtrace2020-01-01 00:08:002020-01-01 00:09:00[DataSource(identifier=53, program='themis-asi...192.029390336.631805[{'conjunction_type': 'nbtrace', 'e1_source': ...
11nbtrace2020-01-01 00:10:002020-01-01 00:11:00[DataSource(identifier=51, program='themis-asi...282.877438285.744881[{'conjunction_type': 'nbtrace', 'e1_source': ...
38nbtrace2020-01-01 00:10:002020-01-01 00:11:00[DataSource(identifier=51, program='themis-asi...195.554240298.419001[{'conjunction_type': 'nbtrace', 'e1_source': ...
30nbtrace2020-01-01 00:11:002020-01-01 00:13:00[DataSource(identifier=46, program='themis-asi...53.391843441.814398[{'conjunction_type': 'nbtrace', 'e1_source': ...
3nbtrace2020-01-01 00:12:002020-01-01 00:13:00[DataSource(identifier=46, program='themis-asi...89.436436332.998863[{'conjunction_type': 'nbtrace', 'e1_source': ...
17nbtrace2020-01-01 00:13:002020-01-01 00:13:00[DataSource(identifier=54, program='themis-asi...401.883399401.883399[{'conjunction_type': 'nbtrace', 'e1_source': ...
37nbtrace2020-01-01 00:13:002020-01-01 00:14:00[DataSource(identifier=50, program='themis-asi...215.337413330.343161[{'conjunction_type': 'nbtrace', 'e1_source': ...
10nbtrace2020-01-01 00:13:002020-01-01 00:15:00[DataSource(identifier=50, program='themis-asi...105.345328488.349867[{'conjunction_type': 'nbtrace', 'e1_source': ...
7nbtrace2020-01-01 00:44:002020-01-01 00:46:00[DataSource(identifier=48, program='themis-asi...114.890751488.203200[{'conjunction_type': 'nbtrace', 'e1_source': ...
33nbtrace2020-01-01 00:44:002020-01-01 00:45:00[DataSource(identifier=48, program='themis-asi...176.558673365.537448[{'conjunction_type': 'nbtrace', 'e1_source': ...
41nbtrace2020-01-01 00:46:002020-01-01 00:47:00[DataSource(identifier=52, program='themis-asi...275.851379345.489291[{'conjunction_type': 'nbtrace', 'e1_source': ...
13nbtrace2020-01-01 00:46:002020-01-01 00:47:00[DataSource(identifier=52, program='themis-asi...216.790371385.043153[{'conjunction_type': 'nbtrace', 'e1_source': ...
8nbtrace2020-01-01 00:47:002020-01-01 00:48:00[DataSource(identifier=49, program='themis-asi...332.998445461.144528[{'conjunction_type': 'nbtrace', 'e1_source': ...
34nbtrace2020-01-01 00:47:002020-01-01 00:48:00[DataSource(identifier=49, program='themis-asi...355.233113396.151714[{'conjunction_type': 'nbtrace', 'e1_source': ...
35nbtrace2020-01-01 00:50:002020-01-01 00:51:00[DataSource(identifier=51, program='themis-asi...117.379897241.904346[{'conjunction_type': 'nbtrace', 'e1_source': ...
24nbtrace2020-01-01 00:52:002020-01-01 00:52:00[DataSource(identifier=46, program='themis-asi...460.151231460.151231[{'conjunction_type': 'nbtrace', 'e1_source': ...
42nbtrace2020-01-01 00:53:002020-01-01 00:53:00[DataSource(identifier=54, program='themis-asi...430.171520430.171520[{'conjunction_type': 'nbtrace', 'e1_source': ...
21nbtrace2020-01-01 00:54:002020-01-01 00:55:00[DataSource(identifier=44, program='themis-asi...265.640223333.568278[{'conjunction_type': 'nbtrace', 'e1_source': ...
27nbtrace2020-01-01 01:29:002020-01-01 01:29:00[DataSource(identifier=47, program='themis-asi...493.180071493.180071[{'conjunction_type': 'nbtrace', 'e1_source': ...
2nbtrace2020-01-01 01:43:002020-01-01 01:45:00[DataSource(identifier=45, program='themis-asi...131.293608465.392815[{'conjunction_type': 'nbtrace', 'e1_source': ...
26nbtrace2020-01-01 01:43:002020-01-01 01:45:00[DataSource(identifier=45, program='themis-asi...198.022033490.128034[{'conjunction_type': 'nbtrace', 'e1_source': ...
23nbtrace2020-01-01 01:45:002020-01-01 01:46:00[DataSource(identifier=44, program='themis-asi...205.885002420.474697[{'conjunction_type': 'nbtrace', 'e1_source': ...
0nbtrace2020-01-01 01:46:002020-01-01 01:47:00[DataSource(identifier=44, program='themis-asi...284.420850493.197476[{'conjunction_type': 'nbtrace', 'e1_source': ...
36nbtrace2020-01-01 02:17:002020-01-01 02:18:00[DataSource(identifier=50, program='themis-asi...375.455878459.284383[{'conjunction_type': 'nbtrace', 'e1_source': ...
9nbtrace2020-01-01 02:17:002020-01-01 02:18:00[DataSource(identifier=50, program='themis-asi...347.656216390.934039[{'conjunction_type': 'nbtrace', 'e1_source': ...
40nbtrace2020-01-01 02:19:002020-01-01 02:20:00[DataSource(identifier=52, program='themis-asi...197.889134494.591201[{'conjunction_type': 'nbtrace', 'e1_source': ...
14nbtrace2020-01-01 02:20:002020-01-01 02:21:00[DataSource(identifier=52, program='themis-asi...228.831208480.716179[{'conjunction_type': 'nbtrace', 'e1_source': ...
22nbtrace2020-01-01 02:28:002020-01-01 02:29:00[DataSource(identifier=45, program='themis-asi...156.167998288.063655[{'conjunction_type': 'nbtrace', 'e1_source': ...
5nbtrace2020-01-01 03:15:002020-01-01 03:16:00[DataSource(identifier=47, program='themis-asi...412.812856489.362899[{'conjunction_type': 'nbtrace', 'e1_source': ...
32nbtrace2020-01-01 03:15:002020-01-01 03:16:00[DataSource(identifier=47, program='themis-asi...385.355069414.231784[{'conjunction_type': 'nbtrace', 'e1_source': ...
47nbtrace2020-01-01 03:17:002020-01-01 03:18:00[DataSource(identifier=64, program='themis-asi...224.424121433.727070[{'conjunction_type': 'nbtrace', 'e1_source': ...
18nbtrace2020-01-01 03:17:002020-01-01 03:18:00[DataSource(identifier=64, program='themis-asi...186.992979344.140279[{'conjunction_type': 'nbtrace', 'e1_source': ...
16nbtrace2020-01-01 03:50:002020-01-01 03:51:00[DataSource(identifier=54, program='themis-asi...106.219997351.707007[{'conjunction_type': 'nbtrace', 'e1_source': ...
44nbtrace2020-01-01 03:50:002020-01-01 03:51:00[DataSource(identifier=54, program='themis-asi...127.208169287.958853[{'conjunction_type': 'nbtrace', 'e1_source': ...
29nbtrace2020-01-01 03:51:002020-01-01 03:52:00[DataSource(identifier=46, program='themis-asi...139.462865365.173735[{'conjunction_type': 'nbtrace', 'e1_source': ...
4nbtrace2020-01-01 03:51:002020-01-01 03:52:00[DataSource(identifier=46, program='themis-asi...142.425348433.674543[{'conjunction_type': 'nbtrace', 'e1_source': ...
12nbtrace2020-01-01 03:53:002020-01-01 03:53:00[DataSource(identifier=51, program='themis-asi...219.412264219.412264[{'conjunction_type': 'nbtrace', 'e1_source': ...
39nbtrace2020-01-01 03:53:002020-01-01 03:53:00[DataSource(identifier=51, program='themis-asi...190.663238190.663238[{'conjunction_type': 'nbtrace', 'e1_source': ...
28nbtrace2020-01-01 04:04:002020-01-01 04:04:00[DataSource(identifier=47, program='themis-asi...368.898466368.898466[{'conjunction_type': 'nbtrace', 'e1_source': ...
45nbtrace2020-01-01 04:05:002020-01-01 04:06:00[DataSource(identifier=65, program='themis-asi...236.205457341.436305[{'conjunction_type': 'nbtrace', 'e1_source': ...
20nbtrace2020-01-01 04:49:002020-01-01 04:50:00[DataSource(identifier=65, program='themis-asi...323.719101352.655457[{'conjunction_type': 'nbtrace', 'e1_source': ...
48nbtrace2020-01-01 04:49:002020-01-01 04:50:00[DataSource(identifier=65, program='themis-asi...244.886114355.591219[{'conjunction_type': 'nbtrace', 'e1_source': ...
1nbtrace2020-01-01 05:23:002020-01-01 05:23:00[DataSource(identifier=45, program='themis-asi...336.102854336.102854[{'conjunction_type': 'nbtrace', 'e1_source': ...
25nbtrace2020-01-01 05:23:002020-01-01 05:23:00[DataSource(identifier=45, program='themis-asi...389.724805389.724805[{'conjunction_type': 'nbtrace', 'e1_source': ...
19nbtrace2020-01-01 06:54:002020-01-01 06:55:00[DataSource(identifier=64, program='themis-asi...256.732039421.977224[{'conjunction_type': 'nbtrace', 'e1_source': ...
46nbtrace2020-01-01 06:54:002020-01-01 06:55:00[DataSource(identifier=64, program='themis-asi...253.959112302.213217[{'conjunction_type': 'nbtrace', 'e1_source': ...
31nbtrace2020-01-01 06:56:002020-01-01 06:56:00[DataSource(identifier=47, program='themis-asi...196.531937196.531937[{'conjunction_type': 'nbtrace', 'e1_source': ...
6nbtrace2020-01-01 06:56:002020-01-01 06:56:00[DataSource(identifier=47, program='themis-asi...212.741402212.741402[{'conjunction_type': 'nbtrace', 'e1_source': ...
\n", "
" ], "text/plain": [ " conjunction_type start end \\\n", "43 nbtrace 2020-01-01 00:08:00 2020-01-01 00:09:00 \n", "15 nbtrace 2020-01-01 00:08:00 2020-01-01 00:09:00 \n", "11 nbtrace 2020-01-01 00:10:00 2020-01-01 00:11:00 \n", "38 nbtrace 2020-01-01 00:10:00 2020-01-01 00:11:00 \n", "30 nbtrace 2020-01-01 00:11:00 2020-01-01 00:13:00 \n", "3 nbtrace 2020-01-01 00:12:00 2020-01-01 00:13:00 \n", "17 nbtrace 2020-01-01 00:13:00 2020-01-01 00:13:00 \n", "37 nbtrace 2020-01-01 00:13:00 2020-01-01 00:14:00 \n", "10 nbtrace 2020-01-01 00:13:00 2020-01-01 00:15:00 \n", "7 nbtrace 2020-01-01 00:44:00 2020-01-01 00:46:00 \n", "33 nbtrace 2020-01-01 00:44:00 2020-01-01 00:45:00 \n", "41 nbtrace 2020-01-01 00:46:00 2020-01-01 00:47:00 \n", "13 nbtrace 2020-01-01 00:46:00 2020-01-01 00:47:00 \n", "8 nbtrace 2020-01-01 00:47:00 2020-01-01 00:48:00 \n", "34 nbtrace 2020-01-01 00:47:00 2020-01-01 00:48:00 \n", "35 nbtrace 2020-01-01 00:50:00 2020-01-01 00:51:00 \n", "24 nbtrace 2020-01-01 00:52:00 2020-01-01 00:52:00 \n", "42 nbtrace 2020-01-01 00:53:00 2020-01-01 00:53:00 \n", "21 nbtrace 2020-01-01 00:54:00 2020-01-01 00:55:00 \n", "27 nbtrace 2020-01-01 01:29:00 2020-01-01 01:29:00 \n", "2 nbtrace 2020-01-01 01:43:00 2020-01-01 01:45:00 \n", "26 nbtrace 2020-01-01 01:43:00 2020-01-01 01:45:00 \n", "23 nbtrace 2020-01-01 01:45:00 2020-01-01 01:46:00 \n", "0 nbtrace 2020-01-01 01:46:00 2020-01-01 01:47:00 \n", "36 nbtrace 2020-01-01 02:17:00 2020-01-01 02:18:00 \n", "9 nbtrace 2020-01-01 02:17:00 2020-01-01 02:18:00 \n", "40 nbtrace 2020-01-01 02:19:00 2020-01-01 02:20:00 \n", "14 nbtrace 2020-01-01 02:20:00 2020-01-01 02:21:00 \n", "22 nbtrace 2020-01-01 02:28:00 2020-01-01 02:29:00 \n", "5 nbtrace 2020-01-01 03:15:00 2020-01-01 03:16:00 \n", "32 nbtrace 2020-01-01 03:15:00 2020-01-01 03:16:00 \n", "47 nbtrace 2020-01-01 03:17:00 2020-01-01 03:18:00 \n", "18 nbtrace 2020-01-01 03:17:00 2020-01-01 03:18:00 \n", "16 nbtrace 2020-01-01 03:50:00 2020-01-01 03:51:00 \n", "44 nbtrace 2020-01-01 03:50:00 2020-01-01 03:51:00 \n", "29 nbtrace 2020-01-01 03:51:00 2020-01-01 03:52:00 \n", "4 nbtrace 2020-01-01 03:51:00 2020-01-01 03:52:00 \n", "12 nbtrace 2020-01-01 03:53:00 2020-01-01 03:53:00 \n", "39 nbtrace 2020-01-01 03:53:00 2020-01-01 03:53:00 \n", "28 nbtrace 2020-01-01 04:04:00 2020-01-01 04:04:00 \n", "45 nbtrace 2020-01-01 04:05:00 2020-01-01 04:06:00 \n", "20 nbtrace 2020-01-01 04:49:00 2020-01-01 04:50:00 \n", "48 nbtrace 2020-01-01 04:49:00 2020-01-01 04:50:00 \n", "1 nbtrace 2020-01-01 05:23:00 2020-01-01 05:23:00 \n", "25 nbtrace 2020-01-01 05:23:00 2020-01-01 05:23:00 \n", "19 nbtrace 2020-01-01 06:54:00 2020-01-01 06:55:00 \n", "46 nbtrace 2020-01-01 06:54:00 2020-01-01 06:55:00 \n", "31 nbtrace 2020-01-01 06:56:00 2020-01-01 06:56:00 \n", "6 nbtrace 2020-01-01 06:56:00 2020-01-01 06:56:00 \n", "\n", " data_sources min_distance \\\n", "43 [DataSource(identifier=53, program='themis-asi... 206.588207 \n", "15 [DataSource(identifier=53, program='themis-asi... 192.029390 \n", "11 [DataSource(identifier=51, program='themis-asi... 282.877438 \n", "38 [DataSource(identifier=51, program='themis-asi... 195.554240 \n", "30 [DataSource(identifier=46, program='themis-asi... 53.391843 \n", "3 [DataSource(identifier=46, program='themis-asi... 89.436436 \n", "17 [DataSource(identifier=54, program='themis-asi... 401.883399 \n", "37 [DataSource(identifier=50, program='themis-asi... 215.337413 \n", "10 [DataSource(identifier=50, program='themis-asi... 105.345328 \n", "7 [DataSource(identifier=48, program='themis-asi... 114.890751 \n", "33 [DataSource(identifier=48, program='themis-asi... 176.558673 \n", "41 [DataSource(identifier=52, program='themis-asi... 275.851379 \n", "13 [DataSource(identifier=52, program='themis-asi... 216.790371 \n", "8 [DataSource(identifier=49, program='themis-asi... 332.998445 \n", "34 [DataSource(identifier=49, program='themis-asi... 355.233113 \n", "35 [DataSource(identifier=51, program='themis-asi... 117.379897 \n", "24 [DataSource(identifier=46, program='themis-asi... 460.151231 \n", "42 [DataSource(identifier=54, program='themis-asi... 430.171520 \n", "21 [DataSource(identifier=44, program='themis-asi... 265.640223 \n", "27 [DataSource(identifier=47, program='themis-asi... 493.180071 \n", "2 [DataSource(identifier=45, program='themis-asi... 131.293608 \n", "26 [DataSource(identifier=45, program='themis-asi... 198.022033 \n", "23 [DataSource(identifier=44, program='themis-asi... 205.885002 \n", "0 [DataSource(identifier=44, program='themis-asi... 284.420850 \n", "36 [DataSource(identifier=50, program='themis-asi... 375.455878 \n", "9 [DataSource(identifier=50, program='themis-asi... 347.656216 \n", "40 [DataSource(identifier=52, program='themis-asi... 197.889134 \n", "14 [DataSource(identifier=52, program='themis-asi... 228.831208 \n", "22 [DataSource(identifier=45, program='themis-asi... 156.167998 \n", "5 [DataSource(identifier=47, program='themis-asi... 412.812856 \n", "32 [DataSource(identifier=47, program='themis-asi... 385.355069 \n", "47 [DataSource(identifier=64, program='themis-asi... 224.424121 \n", "18 [DataSource(identifier=64, program='themis-asi... 186.992979 \n", "16 [DataSource(identifier=54, program='themis-asi... 106.219997 \n", "44 [DataSource(identifier=54, program='themis-asi... 127.208169 \n", "29 [DataSource(identifier=46, program='themis-asi... 139.462865 \n", "4 [DataSource(identifier=46, program='themis-asi... 142.425348 \n", "12 [DataSource(identifier=51, program='themis-asi... 219.412264 \n", "39 [DataSource(identifier=51, program='themis-asi... 190.663238 \n", "28 [DataSource(identifier=47, program='themis-asi... 368.898466 \n", "45 [DataSource(identifier=65, program='themis-asi... 236.205457 \n", "20 [DataSource(identifier=65, program='themis-asi... 323.719101 \n", "48 [DataSource(identifier=65, program='themis-asi... 244.886114 \n", "1 [DataSource(identifier=45, program='themis-asi... 336.102854 \n", "25 [DataSource(identifier=45, program='themis-asi... 389.724805 \n", "19 [DataSource(identifier=64, program='themis-asi... 256.732039 \n", "46 [DataSource(identifier=64, program='themis-asi... 253.959112 \n", "31 [DataSource(identifier=47, program='themis-asi... 196.531937 \n", "6 [DataSource(identifier=47, program='themis-asi... 212.741402 \n", "\n", " max_distance events \n", "43 260.819127 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "15 336.631805 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "11 285.744881 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "38 298.419001 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "30 441.814398 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "3 332.998863 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "17 401.883399 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "37 330.343161 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "10 488.349867 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "7 488.203200 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "33 365.537448 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "41 345.489291 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "13 385.043153 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "8 461.144528 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "34 396.151714 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "35 241.904346 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "24 460.151231 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "42 430.171520 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "21 333.568278 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "27 493.180071 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "2 465.392815 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "26 490.128034 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "23 420.474697 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "0 493.197476 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "36 459.284383 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "9 390.934039 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "40 494.591201 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "14 480.716179 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "22 288.063655 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "5 489.362899 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "32 414.231784 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "47 433.727070 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "18 344.140279 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "16 351.707007 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "44 287.958853 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "29 365.173735 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "4 433.674543 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "12 219.412264 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "39 190.663238 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "28 368.898466 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "45 341.436305 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "20 352.655457 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "48 355.591219 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "1 336.102854 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "25 389.724805 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "19 421.977224 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "46 302.213217 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "31 196.531937 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "6 212.741402 [{'conjunction_type': 'nbtrace', 'e1_source': ... " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# output data as a pandas dataframe\n", "conjunctions = [c.__dict__ for c in s.data]\n", "df = pd.DataFrame(conjunctions)\n", "df.sort_values(\"start\")" ] }, { "cell_type": "markdown", "id": "91b7923f", "metadata": {}, "source": [ "# Search for conjunctions with metadata filters" ] }, { "cell_type": "code", "execution_count": 5, "id": "03312c37", "metadata": {}, "outputs": [], "source": [ "# set up a search for conjunctions between any THEMIS-ASI or REGO instrument, and \n", "# any Swarm instrument with north B trace region = \"north polar cap\"\n", "start = datetime.datetime(2019, 2, 1, 0, 0, 0)\n", "end = datetime.datetime(2019, 2, 10, 23, 59, 59)\n", "ground = [{\n", " \"programs\": [\"themis-asi\", \"rego\"]\n", "}]\n", "space = [{\n", " \"programs\": [\"swarm\"],\n", " \"ephemeris_metadata_filters\": {\n", " \"logical_operator\": \"AND\",\n", " \"expressions\": [\n", " {\n", " \"key\": \"nbtrace_region\",\n", " \"operator\": \"=\",\n", " \"values\": [\"north polar cap\"]\n", " } \n", " ]\n", " }\n", "}]" ] }, { "cell_type": "code", "execution_count": 6, "id": "fbfee063", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2022-01-14 01:12:51.851135] Search object created\n", "[2022-01-14 01:12:51.908313] Request submitted\n", "[2022-01-14 01:12:51.908421] Request ID: 6827cc07-0a51-4232-9a64-cdde62f536ee\n", "[2022-01-14 01:12:51.908432] Request details available at: https://api.aurorax.space/api/v1/conjunctions/requests/6827cc07-0a51-4232-9a64-cdde62f536ee\n", "[2022-01-14 01:12:51.908438] Waiting for data ...\n", "[2022-01-14 01:12:52.983510] Checking for data ...\n", "[2022-01-14 01:12:54.055150] Checking for data ...\n", "[2022-01-14 01:12:55.136435] Checking for data ...\n", "[2022-01-14 01:12:56.215296] Checking for data ...\n", "[2022-01-14 01:12:57.287229] Checking for data ...\n", "[2022-01-14 01:12:58.354662] Checking for data ...\n", "[2022-01-14 01:12:59.436693] Checking for data ...\n", "[2022-01-14 01:13:00.509752] Checking for data ...\n", "[2022-01-14 01:13:01.599192] Checking for data ...\n", "[2022-01-14 01:13:01.685148] Data is now available\n", "[2022-01-14 01:13:01.685299] Retrieving data ...\n", "[2022-01-14 01:13:02.005317] Retrieved 2.0 MB of data containing 273 records\n" ] } ], "source": [ "# perform search\n", "s = pyaurorax.conjunctions.search(start,\n", " end,\n", " distance,\n", " ground=ground,\n", " space=space,\n", " verbose=True)" ] }, { "cell_type": "code", "execution_count": 7, "id": "85ff36e6", "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", "
conjunction_typestartenddata_sourcesmin_distancemax_distanceevents
191nbtrace2019-02-01 02:20:002019-02-01 02:21:00[DataSource(identifier=80, program='rego', pla...153.987890371.020379[{'conjunction_type': 'nbtrace', 'e1_source': ...
90nbtrace2019-02-01 02:20:002019-02-01 02:21:00[DataSource(identifier=53, program='themis-asi...153.987890371.020379[{'conjunction_type': 'nbtrace', 'e1_source': ...
232nbtrace2019-02-01 02:21:002019-02-01 02:22:00[DataSource(identifier=83, program='rego', pla...267.685472300.984658[{'conjunction_type': 'nbtrace', 'e1_source': ...
177nbtrace2019-02-01 03:55:002019-02-01 03:56:00[DataSource(identifier=78, program='rego', pla...471.096543490.131048[{'conjunction_type': 'nbtrace', 'e1_source': ...
223nbtrace2019-02-01 03:57:002019-02-01 03:57:00[DataSource(identifier=83, program='rego', pla...496.774661496.774661[{'conjunction_type': 'nbtrace', 'e1_source': ...
........................
27nbtrace2019-02-10 10:31:002019-02-10 10:31:00[DataSource(identifier=51, program='themis-asi...306.385115306.385115[{'conjunction_type': 'nbtrace', 'e1_source': ...
72nbtrace2019-02-10 10:31:002019-02-10 10:31:00[DataSource(identifier=51, program='themis-asi...284.073933284.073933[{'conjunction_type': 'nbtrace', 'e1_source': ...
224nbtrace2019-02-10 12:13:002019-02-10 12:13:00[DataSource(identifier=83, program='rego', pla...291.186735291.186735[{'conjunction_type': 'nbtrace', 'e1_source': ...
98nbtrace2019-02-10 12:14:002019-02-10 12:15:00[DataSource(identifier=53, program='themis-asi...441.735730481.820741[{'conjunction_type': 'nbtrace', 'e1_source': ...
190nbtrace2019-02-10 12:14:002019-02-10 12:15:00[DataSource(identifier=80, program='rego', pla...441.735730481.820741[{'conjunction_type': 'nbtrace', 'e1_source': ...
\n", "

273 rows × 7 columns

\n", "
" ], "text/plain": [ " conjunction_type start end \\\n", "191 nbtrace 2019-02-01 02:20:00 2019-02-01 02:21:00 \n", "90 nbtrace 2019-02-01 02:20:00 2019-02-01 02:21:00 \n", "232 nbtrace 2019-02-01 02:21:00 2019-02-01 02:22:00 \n", "177 nbtrace 2019-02-01 03:55:00 2019-02-01 03:56:00 \n", "223 nbtrace 2019-02-01 03:57:00 2019-02-01 03:57:00 \n", ".. ... ... ... \n", "27 nbtrace 2019-02-10 10:31:00 2019-02-10 10:31:00 \n", "72 nbtrace 2019-02-10 10:31:00 2019-02-10 10:31:00 \n", "224 nbtrace 2019-02-10 12:13:00 2019-02-10 12:13:00 \n", "98 nbtrace 2019-02-10 12:14:00 2019-02-10 12:15:00 \n", "190 nbtrace 2019-02-10 12:14:00 2019-02-10 12:15:00 \n", "\n", " data_sources min_distance \\\n", "191 [DataSource(identifier=80, program='rego', pla... 153.987890 \n", "90 [DataSource(identifier=53, program='themis-asi... 153.987890 \n", "232 [DataSource(identifier=83, program='rego', pla... 267.685472 \n", "177 [DataSource(identifier=78, program='rego', pla... 471.096543 \n", "223 [DataSource(identifier=83, program='rego', pla... 496.774661 \n", ".. ... ... \n", "27 [DataSource(identifier=51, program='themis-asi... 306.385115 \n", "72 [DataSource(identifier=51, program='themis-asi... 284.073933 \n", "224 [DataSource(identifier=83, program='rego', pla... 291.186735 \n", "98 [DataSource(identifier=53, program='themis-asi... 441.735730 \n", "190 [DataSource(identifier=80, program='rego', pla... 441.735730 \n", "\n", " max_distance events \n", "191 371.020379 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "90 371.020379 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "232 300.984658 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "177 490.131048 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "223 496.774661 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", ".. ... ... \n", "27 306.385115 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "72 284.073933 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "224 291.186735 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "98 481.820741 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "190 481.820741 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "\n", "[273 rows x 7 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# output data as a pandas dataframe\n", "conjunctions = [c.__dict__ for c in s.data]\n", "df = pd.DataFrame(conjunctions)\n", "df.sort_values(\"start\")" ] }, { "cell_type": "markdown", "id": "a62b1156", "metadata": {}, "source": [ "# Search for conjunctions with multiple ground and space instruments, and advanced distances" ] }, { "cell_type": "code", "execution_count": 11, "id": "6c667ce2", "metadata": {}, "outputs": [], "source": [ "# search for conjunctions between any REGO instrument, any TREx instrument, \n", "# any Swarm spacecraft, and any THEMIS spacecraft\n", "#\n", "# we call this a search for \"quadruple conjunctions\"\n", "start = datetime.datetime(2020, 1, 1, 0, 0, 0)\n", "end = datetime.datetime(2020, 1, 4, 23, 59, 59)\n", "ground = [\n", " {\"programs\": [\"rego\"]},\n", " {\"programs\": [\"trex\"]}\n", "]\n", "space = [\n", " {\"programs\": [\"swarm\"]},\n", " {\"programs\": [\"themis\"]}\n", "]\n", "advanced_distances = {\n", " \"ground1-ground2\": None,\n", " \"ground1-space1\": 500,\n", " \"ground1-space2\": 500,\n", " \"ground2-space1\": 500,\n", " \"ground2-space2\": 500,\n", " \"space1-space2\": None\n", "}" ] }, { "cell_type": "code", "execution_count": 12, "id": "f72f1520", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2022-01-14 01:16:19.176222] Search object created\n", "[2022-01-14 01:16:19.256117] Request submitted\n", "[2022-01-14 01:16:19.256310] Request ID: 6a23924d-cf31-472c-a2c7-cae0abe1b5c0\n", "[2022-01-14 01:16:19.256334] Request details available at: https://api.aurorax.space/api/v1/conjunctions/requests/6a23924d-cf31-472c-a2c7-cae0abe1b5c0\n", "[2022-01-14 01:16:19.256346] Waiting for data ...\n", "[2022-01-14 01:16:20.335529] Checking for data ...\n", "[2022-01-14 01:16:21.410486] Checking for data ...\n", "[2022-01-14 01:16:22.495158] Checking for data ...\n", "[2022-01-14 01:16:23.586497] Checking for data ...\n", "[2022-01-14 01:16:24.654038] Checking for data ...\n", "[2022-01-14 01:16:25.726484] Checking for data ...\n", "[2022-01-14 01:16:26.804372] Checking for data ...\n", "[2022-01-14 01:16:27.882619] Checking for data ...\n", "[2022-01-14 01:16:28.954724] Checking for data ...\n", "[2022-01-14 01:16:30.028347] Checking for data ...\n", "[2022-01-14 01:16:30.103125] Data is now available\n", "[2022-01-14 01:16:30.103344] Retrieving data ...\n", "[2022-01-14 01:16:30.210806] Retrieved 84.0 kB of data containing 8 records\n" ] } ], "source": [ "# perform search\n", "s = pyaurorax.conjunctions.search(start,\n", " end,\n", " advanced_distances,\n", " ground=ground,\n", " space=space,\n", " verbose=True)" ] }, { "cell_type": "code", "execution_count": 13, "id": "248f1c09", "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", "
conjunction_typestartenddata_sourcesmin_distancemax_distanceevents
4nbtrace2020-01-02 13:00:002020-01-02 13:01:00[DataSource(identifier=81, program='rego', pla...384.347496440.461162[{'conjunction_type': 'nbtrace', 'e1_source': ...
7nbtrace2020-01-02 13:00:002020-01-02 13:01:00[DataSource(identifier=81, program='rego', pla...384.347496440.461162[{'conjunction_type': 'nbtrace', 'e1_source': ...
0nbtrace2020-01-03 12:33:002020-01-03 12:35:00[DataSource(identifier=81, program='rego', pla...111.324353485.848555[{'conjunction_type': 'nbtrace', 'e1_source': ...
1nbtrace2020-01-03 12:33:002020-01-03 12:35:00[DataSource(identifier=81, program='rego', pla...111.324353485.848555[{'conjunction_type': 'nbtrace', 'e1_source': ...
3nbtrace2020-01-03 12:33:002020-01-03 12:34:00[DataSource(identifier=81, program='rego', pla...122.118464294.065540[{'conjunction_type': 'nbtrace', 'e1_source': ...
6nbtrace2020-01-03 12:33:002020-01-03 12:34:00[DataSource(identifier=81, program='rego', pla...122.118464294.065540[{'conjunction_type': 'nbtrace', 'e1_source': ...
2nbtrace2020-01-03 12:40:002020-01-03 12:42:00[DataSource(identifier=81, program='rego', pla...255.883772476.507384[{'conjunction_type': 'nbtrace', 'e1_source': ...
5nbtrace2020-01-03 12:40:002020-01-03 12:42:00[DataSource(identifier=81, program='rego', pla...255.883772476.507384[{'conjunction_type': 'nbtrace', 'e1_source': ...
\n", "
" ], "text/plain": [ " conjunction_type start end \\\n", "4 nbtrace 2020-01-02 13:00:00 2020-01-02 13:01:00 \n", "7 nbtrace 2020-01-02 13:00:00 2020-01-02 13:01:00 \n", "0 nbtrace 2020-01-03 12:33:00 2020-01-03 12:35:00 \n", "1 nbtrace 2020-01-03 12:33:00 2020-01-03 12:35:00 \n", "3 nbtrace 2020-01-03 12:33:00 2020-01-03 12:34:00 \n", "6 nbtrace 2020-01-03 12:33:00 2020-01-03 12:34:00 \n", "2 nbtrace 2020-01-03 12:40:00 2020-01-03 12:42:00 \n", "5 nbtrace 2020-01-03 12:40:00 2020-01-03 12:42:00 \n", "\n", " data_sources min_distance \\\n", "4 [DataSource(identifier=81, program='rego', pla... 384.347496 \n", "7 [DataSource(identifier=81, program='rego', pla... 384.347496 \n", "0 [DataSource(identifier=81, program='rego', pla... 111.324353 \n", "1 [DataSource(identifier=81, program='rego', pla... 111.324353 \n", "3 [DataSource(identifier=81, program='rego', pla... 122.118464 \n", "6 [DataSource(identifier=81, program='rego', pla... 122.118464 \n", "2 [DataSource(identifier=81, program='rego', pla... 255.883772 \n", "5 [DataSource(identifier=81, program='rego', pla... 255.883772 \n", "\n", " max_distance events \n", "4 440.461162 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "7 440.461162 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "0 485.848555 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "1 485.848555 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "3 294.065540 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "6 294.065540 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "2 476.507384 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "5 476.507384 [{'conjunction_type': 'nbtrace', 'e1_source': ... " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# output data as a pandas dataframe\n", "conjunctions = [c.__dict__ for c in s.data]\n", "df = pd.DataFrame(conjunctions)\n", "df.sort_values(\"start\")" ] }, { "cell_type": "markdown", "id": "d659ce19", "metadata": {}, "source": [ "# Search for conjunctions between spacecrafts only" ] }, { "cell_type": "code", "execution_count": 16, "id": "553dd932", "metadata": {}, "outputs": [], "source": [ "# search for conjunctions between Swarm A or Swarm B, and \n", "# any THEMIS spacecraft with the south B trace region = \"south polar cap\"\n", "start = datetime.datetime(2019, 1, 1, 0, 0, 0)\n", "end = datetime.datetime(2019, 1, 1, 23, 59, 59)\n", "space = [\n", " {\"programs\": [\"themis\"]},\n", " {\n", " \"programs\": [\"swarm\"],\n", " \"platforms\": [\"swarma\", \"swarmb\"],\n", " \"hemisphere\": [\"southern\"],\n", " \"ephemeris_metadata_filters\": {\n", " \"logical_operator\": \"AND\",\n", " \"expressions\": [\n", " {\n", " \"key\": \"sbtrace_region\",\n", " \"operator\": \"=\",\n", " \"values\": [\"south polar cap\"]\n", " }\n", " ]\n", " }\n", " }\n", "]\n", "distance = 500" ] }, { "cell_type": "code", "execution_count": 17, "id": "211b7aaf", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[2022-01-14 01:19:26.589502] Search object created\n", "[2022-01-14 01:19:26.754382] Request submitted\n", "[2022-01-14 01:19:26.754514] Request ID: 0b2dbdd3-d00c-4b4a-a7bb-400a7f2bf6b4\n", "[2022-01-14 01:19:26.754525] Request details available at: https://api.aurorax.space/api/v1/conjunctions/requests/0b2dbdd3-d00c-4b4a-a7bb-400a7f2bf6b4\n", "[2022-01-14 01:19:26.754532] Waiting for data ...\n", "[2022-01-14 01:19:27.837675] Checking for data ...\n", "[2022-01-14 01:19:27.899384] Data is now available\n", "[2022-01-14 01:19:27.899527] Retrieving data ...\n", "[2022-01-14 01:19:27.973476] Retrieved 17.2 kB of data containing 2 records\n" ] } ], "source": [ "#perform search\n", "s = pyaurorax.conjunctions.search(start,\n", " end,\n", " distance,\n", " space=space,\n", " verbose=True)" ] }, { "cell_type": "code", "execution_count": 18, "id": "784ead2e", "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", "
conjunction_typestartenddata_sourcesmin_distancemax_distanceevents
1nbtrace2019-01-01 10:01:002019-01-01 10:01:00[DataSource(identifier=33, program='themis', p...311.183877311.183877[{'conjunction_type': 'nbtrace', 'e1_source': ...
0nbtrace2019-01-01 12:08:002019-01-01 12:08:00[DataSource(identifier=33, program='themis', p...215.817544215.817544[{'conjunction_type': 'nbtrace', 'e1_source': ...
\n", "
" ], "text/plain": [ " conjunction_type start end \\\n", "1 nbtrace 2019-01-01 10:01:00 2019-01-01 10:01:00 \n", "0 nbtrace 2019-01-01 12:08:00 2019-01-01 12:08:00 \n", "\n", " data_sources min_distance \\\n", "1 [DataSource(identifier=33, program='themis', p... 311.183877 \n", "0 [DataSource(identifier=33, program='themis', p... 215.817544 \n", "\n", " max_distance events \n", "1 311.183877 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "0 215.817544 [{'conjunction_type': 'nbtrace', 'e1_source': ... " ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# output data as a pandas dataframe\n", "conjunctions = [c.__dict__ for c in s.data]\n", "df = pd.DataFrame(conjunctions)\n", "df.sort_values(\"start\")" ] }, { "cell_type": "markdown", "id": "1af0d4be", "metadata": {}, "source": [ "# Do the search step-by-step\n", "\n", "Under the hood, the AuroraX API performs a conjunction search asynchronously. Note that this does not mean that it can be done using a Python async method; it means that PyAuroraX does more than just a single HTTP request against the AuroraX API when doing a search. With the API operating this way, it adds some more complexity within PyAuroraX but also opens the search up to some very important capabilities. The main capability enabled by this architecture is the ablity to perform queries for a large timeframe, and/or between a large number of data sources. Queries like this can easily take several minutes. A conventional HTTP request would normally timeout because of this, ultimately failing to complete the search.\n", "\n", "Instead of using the `pyaurorax.conjunctions.search` method which wraps all logic into an easy function, you can also perform a conjunction search step-by-step if you want more control over the process. Below, we do a search in this manner." ] }, { "cell_type": "code", "execution_count": 13, "id": "f0056dd7", "metadata": {}, "outputs": [], "source": [ "# set up the search parameters\n", "start = datetime.datetime(2020, 1, 1, 0, 0, 0)\n", "end = datetime.datetime(2020, 1, 1, 6, 59, 59)\n", "ground = [\n", " {\"programs\": [\"themis-asi\"]}\n", "]\n", "space = [\n", " {\"programs\": [\"swarm\"]}\n", "]\n", "distance = 500" ] }, { "cell_type": "code", "execution_count": 14, "id": "b9fb3c71", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ConjunctionSearch(executed=False, completed=False, request_id='')\n" ] } ], "source": [ "# create a Search object\n", "s = pyaurorax.conjunctions.Search(start,\n", " end,\n", " distance,\n", " ground=ground,\n", " space=space)\n", "print(s)" ] }, { "cell_type": "code", "execution_count": 15, "id": "4eb06d3e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ConjunctionSearch(executed=True, completed=False, request_id='d8845453-e1ed-47c9-b5ac-0a87e2b6ea90')\n" ] } ], "source": [ "# execute the search\n", "s.execute()\n", "print(s)" ] }, { "cell_type": "code", "execution_count": 18, "id": "6980f50c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'logs': [{'level': 'debug',\n", " 'summary': 'Search request arrived and saved',\n", " 'timestamp': '2022-01-14T01:34:35.554156Z'},\n", " {'level': 'info',\n", " 'summary': 'Starting conjunction search for query '\n", " 'd8845453-e1ed-47c9-b5ac-0a87e2b6ea90',\n", " 'timestamp': '2022-01-14T01:34:35.568931Z'},\n", " {'level': 'debug',\n", " 'summary': 'Start search for nbtrace conjunctions using query: Find '\n", " 'conjunctions of type (nbtrace) with epoch precision of '\n", " '60 seconds between data sources of ground1=(program in '\n", " '(themis-asi)) AND space1=(program in (swarm)) WHERE '\n", " 'epochs are between 2020-01-01T00:00:00 AND '\n", " '2020-01-01T06:59:59 UTC HAVING max distances between '\n", " 'location points of ground1-space1=500 km.',\n", " 'timestamp': '2022-01-14T01:34:35.577339Z'},\n", " {'level': 'debug',\n", " 'summary': 'Querying the database 1 times for this overall '\n", " 'combination of criteria blocks and conjunction types. '\n", " 'This log message will repeat 1 times during this '\n", " 'search.',\n", " 'timestamp': '2022-01-14T01:34:35.591566Z'},\n", " {'level': 'debug',\n", " 'summary': 'Querying database for criteria combination [(program in '\n", " '(themis-asi)), (program in (swarm))]',\n", " 'timestamp': '2022-01-14T01:34:35.600836Z'},\n", " {'level': 'debug',\n", " 'summary': 'Found 92 single epoch events',\n", " 'timestamp': '2022-01-14T01:34:35.736566Z'},\n", " {'level': 'debug',\n", " 'summary': 'Reduced single events into 49 continuous intervals',\n", " 'timestamp': '2022-01-14T01:34:35.74363Z'},\n", " {'level': 'debug',\n", " 'summary': 'Searching for super events across all data source '\n", " 'combinations: [[64, 3], [64, 29], [64, 30], [65, 3], '\n", " '[65, 29], [65, 30], [66, 3], [66, 29], [66, 30], [71, '\n", " '3], [71, 29], [71, 30], [73, 3], [73, 29], [73, 30], '\n", " '[44, 3], [44, 29], [44, 30], [45, 3], [45, 29], [45, '\n", " '30], [46, 3], [46, 29], [46, 30], [47, 3], [47, 29], '\n", " '[47, 30], [48, 3], [48, 29], [48, 30], [49, 3], [49, '\n", " '29], [49, 30], [50, 3], [50, 29], [50, 30], [51, 3], '\n", " '[51, 29], [51, 30], [52, 3], [52, 29], [52, 30], [53, '\n", " '3], [53, 29], [53, 30], [54, 3], [54, 29], [54, 30], '\n", " '[55, 3], [55, 29], [55, 30], [56, 3], [56, 29], [56, '\n", " '30], [57, 3], [57, 29], [57, 30], [58, 3], [58, 29], '\n", " '[58, 30], [59, 3], [59, 29], [59, 30], [60, 3], [60, '\n", " '29], [60, 30], [61, 3], [61, 29], [61, 30], [62, 3], '\n", " '[62, 29], [62, 30]]',\n", " 'timestamp': '2022-01-14T01:34:35.761214Z'},\n", " {'level': 'debug',\n", " 'summary': 'Found 49 super events',\n", " 'timestamp': '2022-01-14T01:34:35.770608Z'},\n", " {'level': 'debug',\n", " 'summary': 'Saving results',\n", " 'timestamp': '2022-01-14T01:34:36.285477Z'},\n", " {'level': 'info',\n", " 'summary': 'Search completed',\n", " 'timestamp': '2022-01-14T01:34:36.324394Z'},\n", " {'level': 'debug',\n", " 'summary': 'File size is 373562 bytes.',\n", " 'timestamp': '2022-01-14T01:34:36.331905Z'},\n", " {'level': 'info',\n", " 'summary': 'Finished search in 0.78 seconds and found 49 records.',\n", " 'timestamp': '2022-01-14T01:34:36.349581Z'}],\n", " 'search_request': {'query': {'conjunction_types': ['nbtrace'],\n", " 'end': '2020-01-01T06:59:59',\n", " 'epoch_search_precision': 60,\n", " 'events': [],\n", " 'ground': [{'instrument_types': [],\n", " 'platforms': [],\n", " 'programs': ['themis-asi']}],\n", " 'max_distances': {'ground1-space1': 500},\n", " 'request_id': 'd8845453-e1ed-47c9-b5ac-0a87e2b6ea90',\n", " 'space': [{'hemisphere': [],\n", " 'instrument_types': [],\n", " 'platforms': [],\n", " 'programs': ['swarm']}],\n", " 'start': '2020-01-01T00:00:00'},\n", " 'request_id': 'd8845453-e1ed-47c9-b5ac-0a87e2b6ea90',\n", " 'request_type': 'conjunction',\n", " 'requested': '2022-01-14T01:34:35.53907Z'},\n", " 'search_result': {'completed_timestamp': '2022-01-14T01:34:36.340121Z',\n", " 'data_uri': '/api/v1/conjunctions/requests/d8845453-e1ed-47c9-b5ac-0a87e2b6ea90/data',\n", " 'error_condition': False,\n", " 'file_size': 373562,\n", " 'query_duration': 775,\n", " 'result_count': 49,\n", " 'result_file_deleted_timestamp': None}}\n" ] } ], "source": [ "# get request status\n", "s.update_status()\n", "pprint.pprint(s.status)" ] }, { "cell_type": "code", "execution_count": 19, "id": "372a4821", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[{'level': 'debug',\n", " 'summary': 'Search request arrived and saved',\n", " 'timestamp': '2022-01-14T01:34:35.554156Z'},\n", " {'level': 'info',\n", " 'summary': 'Starting conjunction search for query '\n", " 'd8845453-e1ed-47c9-b5ac-0a87e2b6ea90',\n", " 'timestamp': '2022-01-14T01:34:35.568931Z'},\n", " {'level': 'debug',\n", " 'summary': 'Start search for nbtrace conjunctions using query: Find '\n", " 'conjunctions of type (nbtrace) with epoch precision of 60 '\n", " 'seconds between data sources of ground1=(program in '\n", " '(themis-asi)) AND space1=(program in (swarm)) WHERE epochs are '\n", " 'between 2020-01-01T00:00:00 AND 2020-01-01T06:59:59 UTC HAVING '\n", " 'max distances between location points of ground1-space1=500 km.',\n", " 'timestamp': '2022-01-14T01:34:35.577339Z'},\n", " {'level': 'debug',\n", " 'summary': 'Querying the database 1 times for this overall combination of '\n", " 'criteria blocks and conjunction types. This log message will '\n", " 'repeat 1 times during this search.',\n", " 'timestamp': '2022-01-14T01:34:35.591566Z'},\n", " {'level': 'debug',\n", " 'summary': 'Querying database for criteria combination [(program in '\n", " '(themis-asi)), (program in (swarm))]',\n", " 'timestamp': '2022-01-14T01:34:35.600836Z'},\n", " {'level': 'debug',\n", " 'summary': 'Found 92 single epoch events',\n", " 'timestamp': '2022-01-14T01:34:35.736566Z'},\n", " {'level': 'debug',\n", " 'summary': 'Reduced single events into 49 continuous intervals',\n", " 'timestamp': '2022-01-14T01:34:35.74363Z'},\n", " {'level': 'debug',\n", " 'summary': 'Searching for super events across all data source combinations: '\n", " '[[64, 3], [64, 29], [64, 30], [65, 3], [65, 29], [65, 30], [66, '\n", " '3], [66, 29], [66, 30], [71, 3], [71, 29], [71, 30], [73, 3], '\n", " '[73, 29], [73, 30], [44, 3], [44, 29], [44, 30], [45, 3], [45, '\n", " '29], [45, 30], [46, 3], [46, 29], [46, 30], [47, 3], [47, 29], '\n", " '[47, 30], [48, 3], [48, 29], [48, 30], [49, 3], [49, 29], [49, '\n", " '30], [50, 3], [50, 29], [50, 30], [51, 3], [51, 29], [51, 30], '\n", " '[52, 3], [52, 29], [52, 30], [53, 3], [53, 29], [53, 30], [54, '\n", " '3], [54, 29], [54, 30], [55, 3], [55, 29], [55, 30], [56, 3], '\n", " '[56, 29], [56, 30], [57, 3], [57, 29], [57, 30], [58, 3], [58, '\n", " '29], [58, 30], [59, 3], [59, 29], [59, 30], [60, 3], [60, 29], '\n", " '[60, 30], [61, 3], [61, 29], [61, 30], [62, 3], [62, 29], [62, '\n", " '30]]',\n", " 'timestamp': '2022-01-14T01:34:35.761214Z'},\n", " {'level': 'debug',\n", " 'summary': 'Found 49 super events',\n", " 'timestamp': '2022-01-14T01:34:35.770608Z'},\n", " {'level': 'debug',\n", " 'summary': 'Saving results',\n", " 'timestamp': '2022-01-14T01:34:36.285477Z'},\n", " {'level': 'info',\n", " 'summary': 'Search completed',\n", " 'timestamp': '2022-01-14T01:34:36.324394Z'},\n", " {'level': 'debug',\n", " 'summary': 'File size is 373562 bytes.',\n", " 'timestamp': '2022-01-14T01:34:36.331905Z'},\n", " {'level': 'info',\n", " 'summary': 'Finished search in 0.78 seconds and found 49 records.',\n", " 'timestamp': '2022-01-14T01:34:36.349581Z'}]\n" ] } ], "source": [ "# view just the logs for the request (update the status beforehand, but we do that in the above cell)\n", "pprint.pprint(s.logs)" ] }, { "cell_type": "code", "execution_count": 21, "id": "29557816", "metadata": {}, "outputs": [], "source": [ "# wait for the data\n", "s.wait()\n", "s.update_status()" ] }, { "cell_type": "code", "execution_count": 26, "id": "0a88eef9", "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
conjunction_typestartenddata_sourcesmin_distancemax_distanceevents
43nbtrace2020-01-01 00:08:002020-01-01 00:09:00[DataSource(identifier=53, program='themis-asi...206.588207260.819127[{'conjunction_type': 'nbtrace', 'e1_source': ...
15nbtrace2020-01-01 00:08:002020-01-01 00:09:00[DataSource(identifier=53, program='themis-asi...192.029390336.631805[{'conjunction_type': 'nbtrace', 'e1_source': ...
11nbtrace2020-01-01 00:10:002020-01-01 00:11:00[DataSource(identifier=51, program='themis-asi...282.877438285.744881[{'conjunction_type': 'nbtrace', 'e1_source': ...
38nbtrace2020-01-01 00:10:002020-01-01 00:11:00[DataSource(identifier=51, program='themis-asi...195.554240298.419001[{'conjunction_type': 'nbtrace', 'e1_source': ...
30nbtrace2020-01-01 00:11:002020-01-01 00:13:00[DataSource(identifier=46, program='themis-asi...53.391843441.814398[{'conjunction_type': 'nbtrace', 'e1_source': ...
3nbtrace2020-01-01 00:12:002020-01-01 00:13:00[DataSource(identifier=46, program='themis-asi...89.436436332.998863[{'conjunction_type': 'nbtrace', 'e1_source': ...
17nbtrace2020-01-01 00:13:002020-01-01 00:13:00[DataSource(identifier=54, program='themis-asi...401.883399401.883399[{'conjunction_type': 'nbtrace', 'e1_source': ...
37nbtrace2020-01-01 00:13:002020-01-01 00:14:00[DataSource(identifier=50, program='themis-asi...215.337413330.343161[{'conjunction_type': 'nbtrace', 'e1_source': ...
10nbtrace2020-01-01 00:13:002020-01-01 00:15:00[DataSource(identifier=50, program='themis-asi...105.345328488.349867[{'conjunction_type': 'nbtrace', 'e1_source': ...
7nbtrace2020-01-01 00:44:002020-01-01 00:46:00[DataSource(identifier=48, program='themis-asi...114.890751488.203200[{'conjunction_type': 'nbtrace', 'e1_source': ...
33nbtrace2020-01-01 00:44:002020-01-01 00:45:00[DataSource(identifier=48, program='themis-asi...176.558673365.537448[{'conjunction_type': 'nbtrace', 'e1_source': ...
41nbtrace2020-01-01 00:46:002020-01-01 00:47:00[DataSource(identifier=52, program='themis-asi...275.851379345.489291[{'conjunction_type': 'nbtrace', 'e1_source': ...
13nbtrace2020-01-01 00:46:002020-01-01 00:47:00[DataSource(identifier=52, program='themis-asi...216.790371385.043153[{'conjunction_type': 'nbtrace', 'e1_source': ...
8nbtrace2020-01-01 00:47:002020-01-01 00:48:00[DataSource(identifier=49, program='themis-asi...332.998445461.144528[{'conjunction_type': 'nbtrace', 'e1_source': ...
34nbtrace2020-01-01 00:47:002020-01-01 00:48:00[DataSource(identifier=49, program='themis-asi...355.233113396.151714[{'conjunction_type': 'nbtrace', 'e1_source': ...
35nbtrace2020-01-01 00:50:002020-01-01 00:51:00[DataSource(identifier=51, program='themis-asi...117.379897241.904346[{'conjunction_type': 'nbtrace', 'e1_source': ...
24nbtrace2020-01-01 00:52:002020-01-01 00:52:00[DataSource(identifier=46, program='themis-asi...460.151231460.151231[{'conjunction_type': 'nbtrace', 'e1_source': ...
42nbtrace2020-01-01 00:53:002020-01-01 00:53:00[DataSource(identifier=54, program='themis-asi...430.171520430.171520[{'conjunction_type': 'nbtrace', 'e1_source': ...
21nbtrace2020-01-01 00:54:002020-01-01 00:55:00[DataSource(identifier=44, program='themis-asi...265.640223333.568278[{'conjunction_type': 'nbtrace', 'e1_source': ...
27nbtrace2020-01-01 01:29:002020-01-01 01:29:00[DataSource(identifier=47, program='themis-asi...493.180071493.180071[{'conjunction_type': 'nbtrace', 'e1_source': ...
2nbtrace2020-01-01 01:43:002020-01-01 01:45:00[DataSource(identifier=45, program='themis-asi...131.293608465.392815[{'conjunction_type': 'nbtrace', 'e1_source': ...
26nbtrace2020-01-01 01:43:002020-01-01 01:45:00[DataSource(identifier=45, program='themis-asi...198.022033490.128034[{'conjunction_type': 'nbtrace', 'e1_source': ...
23nbtrace2020-01-01 01:45:002020-01-01 01:46:00[DataSource(identifier=44, program='themis-asi...205.885002420.474697[{'conjunction_type': 'nbtrace', 'e1_source': ...
0nbtrace2020-01-01 01:46:002020-01-01 01:47:00[DataSource(identifier=44, program='themis-asi...284.420850493.197476[{'conjunction_type': 'nbtrace', 'e1_source': ...
36nbtrace2020-01-01 02:17:002020-01-01 02:18:00[DataSource(identifier=50, program='themis-asi...375.455878459.284383[{'conjunction_type': 'nbtrace', 'e1_source': ...
9nbtrace2020-01-01 02:17:002020-01-01 02:18:00[DataSource(identifier=50, program='themis-asi...347.656216390.934039[{'conjunction_type': 'nbtrace', 'e1_source': ...
40nbtrace2020-01-01 02:19:002020-01-01 02:20:00[DataSource(identifier=52, program='themis-asi...197.889134494.591201[{'conjunction_type': 'nbtrace', 'e1_source': ...
14nbtrace2020-01-01 02:20:002020-01-01 02:21:00[DataSource(identifier=52, program='themis-asi...228.831208480.716179[{'conjunction_type': 'nbtrace', 'e1_source': ...
22nbtrace2020-01-01 02:28:002020-01-01 02:29:00[DataSource(identifier=45, program='themis-asi...156.167998288.063655[{'conjunction_type': 'nbtrace', 'e1_source': ...
5nbtrace2020-01-01 03:15:002020-01-01 03:16:00[DataSource(identifier=47, program='themis-asi...412.812856489.362899[{'conjunction_type': 'nbtrace', 'e1_source': ...
32nbtrace2020-01-01 03:15:002020-01-01 03:16:00[DataSource(identifier=47, program='themis-asi...385.355069414.231784[{'conjunction_type': 'nbtrace', 'e1_source': ...
47nbtrace2020-01-01 03:17:002020-01-01 03:18:00[DataSource(identifier=64, program='themis-asi...224.424121433.727070[{'conjunction_type': 'nbtrace', 'e1_source': ...
18nbtrace2020-01-01 03:17:002020-01-01 03:18:00[DataSource(identifier=64, program='themis-asi...186.992979344.140279[{'conjunction_type': 'nbtrace', 'e1_source': ...
16nbtrace2020-01-01 03:50:002020-01-01 03:51:00[DataSource(identifier=54, program='themis-asi...106.219997351.707007[{'conjunction_type': 'nbtrace', 'e1_source': ...
44nbtrace2020-01-01 03:50:002020-01-01 03:51:00[DataSource(identifier=54, program='themis-asi...127.208169287.958853[{'conjunction_type': 'nbtrace', 'e1_source': ...
29nbtrace2020-01-01 03:51:002020-01-01 03:52:00[DataSource(identifier=46, program='themis-asi...139.462865365.173735[{'conjunction_type': 'nbtrace', 'e1_source': ...
4nbtrace2020-01-01 03:51:002020-01-01 03:52:00[DataSource(identifier=46, program='themis-asi...142.425348433.674543[{'conjunction_type': 'nbtrace', 'e1_source': ...
12nbtrace2020-01-01 03:53:002020-01-01 03:53:00[DataSource(identifier=51, program='themis-asi...219.412264219.412264[{'conjunction_type': 'nbtrace', 'e1_source': ...
39nbtrace2020-01-01 03:53:002020-01-01 03:53:00[DataSource(identifier=51, program='themis-asi...190.663238190.663238[{'conjunction_type': 'nbtrace', 'e1_source': ...
28nbtrace2020-01-01 04:04:002020-01-01 04:04:00[DataSource(identifier=47, program='themis-asi...368.898466368.898466[{'conjunction_type': 'nbtrace', 'e1_source': ...
45nbtrace2020-01-01 04:05:002020-01-01 04:06:00[DataSource(identifier=65, program='themis-asi...236.205457341.436305[{'conjunction_type': 'nbtrace', 'e1_source': ...
20nbtrace2020-01-01 04:49:002020-01-01 04:50:00[DataSource(identifier=65, program='themis-asi...323.719101352.655457[{'conjunction_type': 'nbtrace', 'e1_source': ...
48nbtrace2020-01-01 04:49:002020-01-01 04:50:00[DataSource(identifier=65, program='themis-asi...244.886114355.591219[{'conjunction_type': 'nbtrace', 'e1_source': ...
1nbtrace2020-01-01 05:23:002020-01-01 05:23:00[DataSource(identifier=45, program='themis-asi...336.102854336.102854[{'conjunction_type': 'nbtrace', 'e1_source': ...
25nbtrace2020-01-01 05:23:002020-01-01 05:23:00[DataSource(identifier=45, program='themis-asi...389.724805389.724805[{'conjunction_type': 'nbtrace', 'e1_source': ...
19nbtrace2020-01-01 06:54:002020-01-01 06:55:00[DataSource(identifier=64, program='themis-asi...256.732039421.977224[{'conjunction_type': 'nbtrace', 'e1_source': ...
46nbtrace2020-01-01 06:54:002020-01-01 06:55:00[DataSource(identifier=64, program='themis-asi...253.959112302.213217[{'conjunction_type': 'nbtrace', 'e1_source': ...
31nbtrace2020-01-01 06:56:002020-01-01 06:56:00[DataSource(identifier=47, program='themis-asi...196.531937196.531937[{'conjunction_type': 'nbtrace', 'e1_source': ...
6nbtrace2020-01-01 06:56:002020-01-01 06:56:00[DataSource(identifier=47, program='themis-asi...212.741402212.741402[{'conjunction_type': 'nbtrace', 'e1_source': ...
\n", "
" ], "text/plain": [ " conjunction_type start end \\\n", "43 nbtrace 2020-01-01 00:08:00 2020-01-01 00:09:00 \n", "15 nbtrace 2020-01-01 00:08:00 2020-01-01 00:09:00 \n", "11 nbtrace 2020-01-01 00:10:00 2020-01-01 00:11:00 \n", "38 nbtrace 2020-01-01 00:10:00 2020-01-01 00:11:00 \n", "30 nbtrace 2020-01-01 00:11:00 2020-01-01 00:13:00 \n", "3 nbtrace 2020-01-01 00:12:00 2020-01-01 00:13:00 \n", "17 nbtrace 2020-01-01 00:13:00 2020-01-01 00:13:00 \n", "37 nbtrace 2020-01-01 00:13:00 2020-01-01 00:14:00 \n", "10 nbtrace 2020-01-01 00:13:00 2020-01-01 00:15:00 \n", "7 nbtrace 2020-01-01 00:44:00 2020-01-01 00:46:00 \n", "33 nbtrace 2020-01-01 00:44:00 2020-01-01 00:45:00 \n", "41 nbtrace 2020-01-01 00:46:00 2020-01-01 00:47:00 \n", "13 nbtrace 2020-01-01 00:46:00 2020-01-01 00:47:00 \n", "8 nbtrace 2020-01-01 00:47:00 2020-01-01 00:48:00 \n", "34 nbtrace 2020-01-01 00:47:00 2020-01-01 00:48:00 \n", "35 nbtrace 2020-01-01 00:50:00 2020-01-01 00:51:00 \n", "24 nbtrace 2020-01-01 00:52:00 2020-01-01 00:52:00 \n", "42 nbtrace 2020-01-01 00:53:00 2020-01-01 00:53:00 \n", "21 nbtrace 2020-01-01 00:54:00 2020-01-01 00:55:00 \n", "27 nbtrace 2020-01-01 01:29:00 2020-01-01 01:29:00 \n", "2 nbtrace 2020-01-01 01:43:00 2020-01-01 01:45:00 \n", "26 nbtrace 2020-01-01 01:43:00 2020-01-01 01:45:00 \n", "23 nbtrace 2020-01-01 01:45:00 2020-01-01 01:46:00 \n", "0 nbtrace 2020-01-01 01:46:00 2020-01-01 01:47:00 \n", "36 nbtrace 2020-01-01 02:17:00 2020-01-01 02:18:00 \n", "9 nbtrace 2020-01-01 02:17:00 2020-01-01 02:18:00 \n", "40 nbtrace 2020-01-01 02:19:00 2020-01-01 02:20:00 \n", "14 nbtrace 2020-01-01 02:20:00 2020-01-01 02:21:00 \n", "22 nbtrace 2020-01-01 02:28:00 2020-01-01 02:29:00 \n", "5 nbtrace 2020-01-01 03:15:00 2020-01-01 03:16:00 \n", "32 nbtrace 2020-01-01 03:15:00 2020-01-01 03:16:00 \n", "47 nbtrace 2020-01-01 03:17:00 2020-01-01 03:18:00 \n", "18 nbtrace 2020-01-01 03:17:00 2020-01-01 03:18:00 \n", "16 nbtrace 2020-01-01 03:50:00 2020-01-01 03:51:00 \n", "44 nbtrace 2020-01-01 03:50:00 2020-01-01 03:51:00 \n", "29 nbtrace 2020-01-01 03:51:00 2020-01-01 03:52:00 \n", "4 nbtrace 2020-01-01 03:51:00 2020-01-01 03:52:00 \n", "12 nbtrace 2020-01-01 03:53:00 2020-01-01 03:53:00 \n", "39 nbtrace 2020-01-01 03:53:00 2020-01-01 03:53:00 \n", "28 nbtrace 2020-01-01 04:04:00 2020-01-01 04:04:00 \n", "45 nbtrace 2020-01-01 04:05:00 2020-01-01 04:06:00 \n", "20 nbtrace 2020-01-01 04:49:00 2020-01-01 04:50:00 \n", "48 nbtrace 2020-01-01 04:49:00 2020-01-01 04:50:00 \n", "1 nbtrace 2020-01-01 05:23:00 2020-01-01 05:23:00 \n", "25 nbtrace 2020-01-01 05:23:00 2020-01-01 05:23:00 \n", "19 nbtrace 2020-01-01 06:54:00 2020-01-01 06:55:00 \n", "46 nbtrace 2020-01-01 06:54:00 2020-01-01 06:55:00 \n", "31 nbtrace 2020-01-01 06:56:00 2020-01-01 06:56:00 \n", "6 nbtrace 2020-01-01 06:56:00 2020-01-01 06:56:00 \n", "\n", " data_sources min_distance \\\n", "43 [DataSource(identifier=53, program='themis-asi... 206.588207 \n", "15 [DataSource(identifier=53, program='themis-asi... 192.029390 \n", "11 [DataSource(identifier=51, program='themis-asi... 282.877438 \n", "38 [DataSource(identifier=51, program='themis-asi... 195.554240 \n", "30 [DataSource(identifier=46, program='themis-asi... 53.391843 \n", "3 [DataSource(identifier=46, program='themis-asi... 89.436436 \n", "17 [DataSource(identifier=54, program='themis-asi... 401.883399 \n", "37 [DataSource(identifier=50, program='themis-asi... 215.337413 \n", "10 [DataSource(identifier=50, program='themis-asi... 105.345328 \n", "7 [DataSource(identifier=48, program='themis-asi... 114.890751 \n", "33 [DataSource(identifier=48, program='themis-asi... 176.558673 \n", "41 [DataSource(identifier=52, program='themis-asi... 275.851379 \n", "13 [DataSource(identifier=52, program='themis-asi... 216.790371 \n", "8 [DataSource(identifier=49, program='themis-asi... 332.998445 \n", "34 [DataSource(identifier=49, program='themis-asi... 355.233113 \n", "35 [DataSource(identifier=51, program='themis-asi... 117.379897 \n", "24 [DataSource(identifier=46, program='themis-asi... 460.151231 \n", "42 [DataSource(identifier=54, program='themis-asi... 430.171520 \n", "21 [DataSource(identifier=44, program='themis-asi... 265.640223 \n", "27 [DataSource(identifier=47, program='themis-asi... 493.180071 \n", "2 [DataSource(identifier=45, program='themis-asi... 131.293608 \n", "26 [DataSource(identifier=45, program='themis-asi... 198.022033 \n", "23 [DataSource(identifier=44, program='themis-asi... 205.885002 \n", "0 [DataSource(identifier=44, program='themis-asi... 284.420850 \n", "36 [DataSource(identifier=50, program='themis-asi... 375.455878 \n", "9 [DataSource(identifier=50, program='themis-asi... 347.656216 \n", "40 [DataSource(identifier=52, program='themis-asi... 197.889134 \n", "14 [DataSource(identifier=52, program='themis-asi... 228.831208 \n", "22 [DataSource(identifier=45, program='themis-asi... 156.167998 \n", "5 [DataSource(identifier=47, program='themis-asi... 412.812856 \n", "32 [DataSource(identifier=47, program='themis-asi... 385.355069 \n", "47 [DataSource(identifier=64, program='themis-asi... 224.424121 \n", "18 [DataSource(identifier=64, program='themis-asi... 186.992979 \n", "16 [DataSource(identifier=54, program='themis-asi... 106.219997 \n", "44 [DataSource(identifier=54, program='themis-asi... 127.208169 \n", "29 [DataSource(identifier=46, program='themis-asi... 139.462865 \n", "4 [DataSource(identifier=46, program='themis-asi... 142.425348 \n", "12 [DataSource(identifier=51, program='themis-asi... 219.412264 \n", "39 [DataSource(identifier=51, program='themis-asi... 190.663238 \n", "28 [DataSource(identifier=47, program='themis-asi... 368.898466 \n", "45 [DataSource(identifier=65, program='themis-asi... 236.205457 \n", "20 [DataSource(identifier=65, program='themis-asi... 323.719101 \n", "48 [DataSource(identifier=65, program='themis-asi... 244.886114 \n", "1 [DataSource(identifier=45, program='themis-asi... 336.102854 \n", "25 [DataSource(identifier=45, program='themis-asi... 389.724805 \n", "19 [DataSource(identifier=64, program='themis-asi... 256.732039 \n", "46 [DataSource(identifier=64, program='themis-asi... 253.959112 \n", "31 [DataSource(identifier=47, program='themis-asi... 196.531937 \n", "6 [DataSource(identifier=47, program='themis-asi... 212.741402 \n", "\n", " max_distance events \n", "43 260.819127 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "15 336.631805 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "11 285.744881 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "38 298.419001 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "30 441.814398 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "3 332.998863 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "17 401.883399 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "37 330.343161 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "10 488.349867 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "7 488.203200 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "33 365.537448 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "41 345.489291 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "13 385.043153 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "8 461.144528 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "34 396.151714 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "35 241.904346 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "24 460.151231 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "42 430.171520 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "21 333.568278 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "27 493.180071 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "2 465.392815 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "26 490.128034 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "23 420.474697 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "0 493.197476 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "36 459.284383 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "9 390.934039 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "40 494.591201 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "14 480.716179 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "22 288.063655 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "5 489.362899 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "32 414.231784 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "47 433.727070 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "18 344.140279 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "16 351.707007 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "44 287.958853 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "29 365.173735 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "4 433.674543 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "12 219.412264 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "39 190.663238 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "28 368.898466 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "45 341.436305 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "20 352.655457 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "48 355.591219 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "1 336.102854 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "25 389.724805 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "19 421.977224 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "46 302.213217 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "31 196.531937 [{'conjunction_type': 'nbtrace', 'e1_source': ... \n", "6 212.741402 [{'conjunction_type': 'nbtrace', 'e1_source': ... " ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# get data\n", "s.get_data()\n", "\n", "# show data as pandas dataframe\n", "data_products = [d.__dict__ for d in s.data]\n", "df = pd.DataFrame(data_products)\n", "df.sort_values(\"start\")" ] }, { "cell_type": "code", "execution_count": null, "id": "0c4c9e95", "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": 5 }