{
"cells": [
{
"cell_type": "markdown",
"id": "742c3393",
"metadata": {},
"source": [
"# Collect Observations\n",
"\n",
"This example demonstrates how to use direct function calls of the low-level TAT-C library to collect observations of a surface point. Observations show when a satellite-based instrument can observe the point based on spatial and operational constraints."
]
},
{
"cell_type": "markdown",
"id": "bf0fbfcc",
"metadata": {},
"source": [
"First we define the satellites for a mission. In this example we define one satellite (NOAA-20) with a single instrument (Visual/Infrared Imager Radiometer Suite, VIIRS) and an orbit derived from a known two-line element set (TLE). The TLE defines the orbital state at an instant in time which can be used to determine future positions of the satellite. The example TLE below for NOAA-20 was collected from [CelesTrak](https://celestrak.org/) around July 2022."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "1d35caa8-d57f-4a4a-91c0-54b59d4665d6",
"metadata": {},
"outputs": [],
"source": [
"noaa20_tle = [\n",
" \"1 43013U 17073A 22195.78278435 .00000038 00000+0 38919-4 0 9996\",\n",
" \"2 43013 98.7169 133.9110 0001202 63.8768 296.2532 14.19561306241107\",\n",
"]"
]
},
{
"cell_type": "markdown",
"id": "613e9918-8227-4c1a-a350-ea12a38a4cc2",
"metadata": {},
"source": [
"TAT-C allows several types of orbit specifications, one of which being the `TwoLineElements` specification which requires the TLE as an argument."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "63634767-5bd9-4765-a4ff-f1f21f705baa",
"metadata": {},
"outputs": [],
"source": [
"from tatc.schemas import TwoLineElements\n",
"\n",
"noaa20_orbit = TwoLineElements(tle=noaa20_tle)"
]
},
{
"cell_type": "markdown",
"id": "dcafe351-d25c-469d-992c-7989e92cada0",
"metadata": {},
"source": [
"Next, we define an instrument to perform observations. The most important parameter is the _field of regard_ which sets the view angle from the satellite to the Earth's surface. The TAT-C `utils` package contains a function to calculate the field of regard from an instrument's altitude (834 km) and swath width (3000 km)."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "93cce855-971e-4aae-8688-61a205979b62",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"computed field of regard: 111.6 degrees\n"
]
}
],
"source": [
"from tatc import utils\n",
"\n",
"viirs_for = utils.swath_width_to_field_of_regard(834e3, 3000e3)\n",
"print(f\"computed field of regard: {viirs_for:.1f} degrees\")"
]
},
{
"cell_type": "markdown",
"id": "cd6803d8-b03c-48b2-81ab-84b121ce5f85",
"metadata": {},
"source": [
"We can pass the field of regard to create an instrument model of VIIRS."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "1ec7796a-d1eb-4f1e-bdbe-603fc2db8868",
"metadata": {},
"outputs": [],
"source": [
"from tatc.schemas import Instrument\n",
"\n",
"viirs = Instrument(name=\"VIIRS\", field_of_regard=viirs_for)"
]
},
{
"cell_type": "markdown",
"id": "83bd97d1-0de8-4d61-a63d-0a1aa09d4307",
"metadata": {},
"source": [
"Finally, we can combine the orbit and instrument to define a new satellite."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "5bbab563-7c29-4797-b9dd-0b697d431edf",
"metadata": {},
"outputs": [],
"source": [
"from tatc.schemas import Satellite\n",
"\n",
"noaa20 = Satellite(name=\"NOAA 20\", orbit=noaa20_orbit, instruments=[viirs])"
]
},
{
"cell_type": "markdown",
"id": "a7c70867",
"metadata": {},
"source": [
"Next, we define the point of interest to observe using geodetic coordinates."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "bd5d2afb-089b-4901-b9b0-14ed5cc2c435",
"metadata": {},
"outputs": [],
"source": [
"from tatc.schemas import Point\n",
"\n",
"hoboken = Point(id=0, latitude=40.74259, longitude=-74.02686)"
]
},
{
"cell_type": "markdown",
"id": "8bc4850c-97ff-4099-aaa3-c54e19bf83e1",
"metadata": {},
"source": [
"Next, we can identify the starting and ending time of a sample mission period. The starting time is noon UTC on July 14, 2022 and the ending time is 30 days later (noon UTC on August 13, 2022)."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "1ea162ff-52e4-4852-a48f-6545b3bd89dd",
"metadata": {},
"outputs": [],
"source": [
"from datetime import datetime, timedelta, timezone\n",
"\n",
"start = datetime(year=2022, month=7, day=14, hour=12, tzinfo=timezone.utc)\n",
"end = start + timedelta(days=30)"
]
},
{
"cell_type": "markdown",
"id": "8ea52795-c3f3-4d0c-ab4d-f4ad2fc38918",
"metadata": {},
"source": [
"The `collect_observations` analysis function identifies all of the observation opportunities of a point by a satellite instrument between the starting and ending time. Results are formatted as a flat GeoDataFrame which is similar to a regular pandas DataFrame with a geospatial column labeled `geometry`. Other columns:\n",
" * `start`: observation rise time (or mission start for first observation)\n",
" * `end`: observation set time (or mission end for last observation)\n",
" * `epoch`: observation midpoint\n",
" * `sat_alt`: satellite altitude angle (degrees) at epoch\n",
" * `sat_az`: satellite azimuth angle (degrees) at epoch"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "6d41f563-cdbc-4d5b-acd7-635c250c39b7",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
point_id
\n",
"
geometry
\n",
"
satellite
\n",
"
instrument
\n",
"
start
\n",
"
end
\n",
"
epoch
\n",
"
sat_alt
\n",
"
sat_az
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-14 17:14:31.310369+00:00
\n",
"
2022-07-14 17:21:09.157255+00:00
\n",
"
2022-07-14 17:17:50.233812+00:00
\n",
"
45.832413
\n",
"
69.766369
\n",
"
\n",
"
\n",
"
1
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-14 18:56:58.849666+00:00
\n",
"
2022-07-14 18:59:29.309441+00:00
\n",
"
2022-07-14 18:58:14.079553500+00:00
\n",
"
22.556721
\n",
"
266.369724
\n",
"
\n",
"
\n",
"
2
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-15 07:12:52.951632+00:00
\n",
"
2022-07-15 07:19:53.364882+00:00
\n",
"
2022-07-15 07:16:23.158257+00:00
\n",
"
54.469247
\n",
"
288.828497
\n",
"
\n",
"
\n",
"
3
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-15 16:56:31.366398+00:00
\n",
"
2022-07-15 17:01:47.933741+00:00
\n",
"
2022-07-15 16:59:09.650069500+00:00
\n",
"
31.731119
\n",
"
66.726221
\n",
"
\n",
"
\n",
"
4
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-15 18:36:30.433195+00:00
\n",
"
2022-07-15 18:42:04.442407+00:00
\n",
"
2022-07-15 18:39:17.437801+00:00
\n",
"
33.133927
\n",
"
263.486527
\n",
"
\n",
"
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
\n",
"
\n",
"
75
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-11 16:50:18.188008+00:00
\n",
"
2022-08-11 16:54:52.763667+00:00
\n",
"
2022-08-11 16:52:35.475837500+00:00
\n",
"
28.098506
\n",
"
65.027713
\n",
"
\n",
"
\n",
"
76
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-11 18:29:34.474832+00:00
\n",
"
2022-08-11 18:35:40.954880+00:00
\n",
"
2022-08-11 18:32:37.714856+00:00
\n",
"
37.899973
\n",
"
263.363098
\n",
"
\n",
"
\n",
"
77
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-12 06:47:16.593473+00:00
\n",
"
2022-08-12 06:54:45.463780+00:00
\n",
"
2022-08-12 06:51:01.028626500+00:00
\n",
"
89.184043
\n",
"
156.518247
\n",
"
\n",
"
\n",
"
78
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-12 18:10:11.765146+00:00
\n",
"
2022-08-12 18:17:18.069412+00:00
\n",
"
2022-08-12 18:13:44.917279+00:00
\n",
"
56.535506
\n",
"
261.467055
\n",
"
\n",
"
\n",
"
79
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-13 06:28:34.773044+00:00
\n",
"
2022-08-13 06:35:48.839408+00:00
\n",
"
2022-08-13 06:32:11.806226+00:00
\n",
"
61.217019
\n",
"
102.685206
\n",
"
\n",
" \n",
"
\n",
"
80 rows × 9 columns
\n",
"
"
],
"text/plain": [
" point_id geometry satellite instrument \\\n",
"0 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"1 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"2 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"3 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"4 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
".. ... ... ... ... \n",
"75 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"76 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"77 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"78 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"79 0 POINT Z (-74.02686 40.74259 0) NOAA 20 VIIRS \n",
"\n",
" start end \\\n",
"0 2022-07-14 17:14:31.310369+00:00 2022-07-14 17:21:09.157255+00:00 \n",
"1 2022-07-14 18:56:58.849666+00:00 2022-07-14 18:59:29.309441+00:00 \n",
"2 2022-07-15 07:12:52.951632+00:00 2022-07-15 07:19:53.364882+00:00 \n",
"3 2022-07-15 16:56:31.366398+00:00 2022-07-15 17:01:47.933741+00:00 \n",
"4 2022-07-15 18:36:30.433195+00:00 2022-07-15 18:42:04.442407+00:00 \n",
".. ... ... \n",
"75 2022-08-11 16:50:18.188008+00:00 2022-08-11 16:54:52.763667+00:00 \n",
"76 2022-08-11 18:29:34.474832+00:00 2022-08-11 18:35:40.954880+00:00 \n",
"77 2022-08-12 06:47:16.593473+00:00 2022-08-12 06:54:45.463780+00:00 \n",
"78 2022-08-12 18:10:11.765146+00:00 2022-08-12 18:17:18.069412+00:00 \n",
"79 2022-08-13 06:28:34.773044+00:00 2022-08-13 06:35:48.839408+00:00 \n",
"\n",
" epoch sat_alt sat_az \n",
"0 2022-07-14 17:17:50.233812+00:00 45.832413 69.766369 \n",
"1 2022-07-14 18:58:14.079553500+00:00 22.556721 266.369724 \n",
"2 2022-07-15 07:16:23.158257+00:00 54.469247 288.828497 \n",
"3 2022-07-15 16:59:09.650069500+00:00 31.731119 66.726221 \n",
"4 2022-07-15 18:39:17.437801+00:00 33.133927 263.486527 \n",
".. ... ... ... \n",
"75 2022-08-11 16:52:35.475837500+00:00 28.098506 65.027713 \n",
"76 2022-08-11 18:32:37.714856+00:00 37.899973 263.363098 \n",
"77 2022-08-12 06:51:01.028626500+00:00 89.184043 156.518247 \n",
"78 2022-08-12 18:13:44.917279+00:00 56.535506 261.467055 \n",
"79 2022-08-13 06:32:11.806226+00:00 61.217019 102.685206 \n",
"\n",
"[80 rows x 9 columns]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from tatc.analysis import collect_observations\n",
"\n",
"results = collect_observations(hoboken, noaa20, start, end)\n",
"display(results)"
]
},
{
"cell_type": "markdown",
"id": "0b1c3c5b-a27f-4bf4-927d-22956e290687",
"metadata": {},
"source": [
"The `aggregate_observations` function groups observations of points to compute metrics like access and revisit.\n",
" * `access`: duration of an observation\n",
" * `revisit`: duration since the prior observation (note: the first observation has `NaT` for missing data"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "b3c10bfb-3ebe-48e7-8299-f9ba86ead594",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
geometry
\n",
"
point_id
\n",
"
satellite
\n",
"
instrument
\n",
"
start
\n",
"
epoch
\n",
"
end
\n",
"
access
\n",
"
revisit
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-14 17:14:31.310369+00:00
\n",
"
2022-07-14 17:17:50.233811968+00:00
\n",
"
2022-07-14 17:21:09.157255+00:00
\n",
"
0 days 00:06:37.846886
\n",
"
NaT
\n",
"
\n",
"
\n",
"
1
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-14 18:56:58.849666+00:00
\n",
"
2022-07-14 18:58:14.079553536+00:00
\n",
"
2022-07-14 18:59:29.309441+00:00
\n",
"
0 days 00:02:30.459775
\n",
"
0 days 01:35:49.692411
\n",
"
\n",
"
\n",
"
2
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-15 07:12:52.951632+00:00
\n",
"
2022-07-15 07:16:23.158256896+00:00
\n",
"
2022-07-15 07:19:53.364882+00:00
\n",
"
0 days 00:07:00.413250
\n",
"
0 days 12:13:23.642191
\n",
"
\n",
"
\n",
"
3
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-15 16:56:31.366398+00:00
\n",
"
2022-07-15 16:59:09.650069504+00:00
\n",
"
2022-07-15 17:01:47.933741+00:00
\n",
"
0 days 00:05:16.567343
\n",
"
0 days 09:36:38.001516
\n",
"
\n",
"
\n",
"
4
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-07-15 18:36:30.433195+00:00
\n",
"
2022-07-15 18:39:17.437800960+00:00
\n",
"
2022-07-15 18:42:04.442407+00:00
\n",
"
0 days 00:05:34.009212
\n",
"
0 days 01:34:42.499454
\n",
"
\n",
"
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
...
\n",
"
\n",
"
\n",
"
75
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-11 16:50:18.188008+00:00
\n",
"
2022-08-11 16:52:35.475837440+00:00
\n",
"
2022-08-11 16:54:52.763667+00:00
\n",
"
0 days 00:04:34.575659
\n",
"
0 days 09:36:54.523333
\n",
"
\n",
"
\n",
"
76
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-11 18:29:34.474832+00:00
\n",
"
2022-08-11 18:32:37.714855936+00:00
\n",
"
2022-08-11 18:35:40.954880+00:00
\n",
"
0 days 00:06:06.480048
\n",
"
0 days 01:34:41.711165
\n",
"
\n",
"
\n",
"
77
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-12 06:47:16.593473+00:00
\n",
"
2022-08-12 06:51:01.028626432+00:00
\n",
"
2022-08-12 06:54:45.463780+00:00
\n",
"
0 days 00:07:28.870307
\n",
"
0 days 12:11:35.638593
\n",
"
\n",
"
\n",
"
78
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-12 18:10:11.765146+00:00
\n",
"
2022-08-12 18:13:44.917278976+00:00
\n",
"
2022-08-12 18:17:18.069412+00:00
\n",
"
0 days 00:07:06.304266
\n",
"
0 days 11:15:26.301366
\n",
"
\n",
"
\n",
"
79
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0
\n",
"
NOAA 20
\n",
"
VIIRS
\n",
"
2022-08-13 06:28:34.773044+00:00
\n",
"
2022-08-13 06:32:11.806225920+00:00
\n",
"
2022-08-13 06:35:48.839408+00:00
\n",
"
0 days 00:07:14.066364
\n",
"
0 days 12:11:16.703632
\n",
"
\n",
" \n",
"
\n",
"
80 rows × 9 columns
\n",
"
"
],
"text/plain": [
" geometry point_id satellite instrument \\\n",
"0 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"1 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"2 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"3 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"4 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
".. ... ... ... ... \n",
"75 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"76 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"77 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"78 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"79 POINT Z (-74.02686 40.74259 0) 0 NOAA 20 VIIRS \n",
"\n",
" start epoch \\\n",
"0 2022-07-14 17:14:31.310369+00:00 2022-07-14 17:17:50.233811968+00:00 \n",
"1 2022-07-14 18:56:58.849666+00:00 2022-07-14 18:58:14.079553536+00:00 \n",
"2 2022-07-15 07:12:52.951632+00:00 2022-07-15 07:16:23.158256896+00:00 \n",
"3 2022-07-15 16:56:31.366398+00:00 2022-07-15 16:59:09.650069504+00:00 \n",
"4 2022-07-15 18:36:30.433195+00:00 2022-07-15 18:39:17.437800960+00:00 \n",
".. ... ... \n",
"75 2022-08-11 16:50:18.188008+00:00 2022-08-11 16:52:35.475837440+00:00 \n",
"76 2022-08-11 18:29:34.474832+00:00 2022-08-11 18:32:37.714855936+00:00 \n",
"77 2022-08-12 06:47:16.593473+00:00 2022-08-12 06:51:01.028626432+00:00 \n",
"78 2022-08-12 18:10:11.765146+00:00 2022-08-12 18:13:44.917278976+00:00 \n",
"79 2022-08-13 06:28:34.773044+00:00 2022-08-13 06:32:11.806225920+00:00 \n",
"\n",
" end access \\\n",
"0 2022-07-14 17:21:09.157255+00:00 0 days 00:06:37.846886 \n",
"1 2022-07-14 18:59:29.309441+00:00 0 days 00:02:30.459775 \n",
"2 2022-07-15 07:19:53.364882+00:00 0 days 00:07:00.413250 \n",
"3 2022-07-15 17:01:47.933741+00:00 0 days 00:05:16.567343 \n",
"4 2022-07-15 18:42:04.442407+00:00 0 days 00:05:34.009212 \n",
".. ... ... \n",
"75 2022-08-11 16:54:52.763667+00:00 0 days 00:04:34.575659 \n",
"76 2022-08-11 18:35:40.954880+00:00 0 days 00:06:06.480048 \n",
"77 2022-08-12 06:54:45.463780+00:00 0 days 00:07:28.870307 \n",
"78 2022-08-12 18:17:18.069412+00:00 0 days 00:07:06.304266 \n",
"79 2022-08-13 06:35:48.839408+00:00 0 days 00:07:14.066364 \n",
"\n",
" revisit \n",
"0 NaT \n",
"1 0 days 01:35:49.692411 \n",
"2 0 days 12:13:23.642191 \n",
"3 0 days 09:36:38.001516 \n",
"4 0 days 01:34:42.499454 \n",
".. ... \n",
"75 0 days 09:36:54.523333 \n",
"76 0 days 01:34:41.711165 \n",
"77 0 days 12:11:35.638593 \n",
"78 0 days 11:15:26.301366 \n",
"79 0 days 12:11:16.703632 \n",
"\n",
"[80 rows x 9 columns]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from tatc.analysis import aggregate_observations\n",
"\n",
"aggregated_results = aggregate_observations(results)\n",
"display(aggregated_results)"
]
},
{
"cell_type": "markdown",
"id": "529b44f5-26a8-4828-b848-43749d3bd7d8",
"metadata": {},
"source": [
"Finally, TAT-C includes a supplemental method `reduce_observations` to compute descriptive statistics."
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "06182408-dd57-4824-819b-4115520a07e7",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
point_id
\n",
"
geometry
\n",
"
access
\n",
"
revisit
\n",
"
samples
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
0
\n",
"
POINT Z (-74.02686 40.74259 0)
\n",
"
0 days 00:05:55.491148
\n",
"
0 days 08:52:45.040978
\n",
"
80
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" point_id geometry access \\\n",
"0 0 POINT Z (-74.02686 40.74259 0) 0 days 00:05:55.491148 \n",
"\n",
" revisit samples \n",
"0 0 days 08:52:45.040978 80 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from tatc.analysis import reduce_observations\n",
"\n",
"reduced_results = reduce_observations(aggregated_results)\n",
"display(reduced_results)"
]
},
{
"cell_type": "markdown",
"id": "4bc6eb4a-942c-4467-a89b-28a6ef8fad03",
"metadata": {},
"source": [
"The same sequence of operations can be repeated for satellite constellations. For example, the following constellation starts with NOAA-20 as a \"template\" and arranges 3 satellites in 3 orbital planes following a Walker star geometry."
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "ba6f1632-f334-4482-bad1-f0dfdf0fa7df",
"metadata": {},
"outputs": [],
"source": [
"from tatc.schemas import WalkerConstellation\n",
"\n",
"const = WalkerConstellation(\n",
" name=\"NOAA 20\",\n",
" orbit=noaa20_orbit,\n",
" instruments=[viirs],\n",
" number_satellites=3,\n",
" number_planes=3,\n",
" configuration=\"star\",\n",
")"
]
},
{
"cell_type": "markdown",
"id": "fbd888a1-7013-4e6b-a597-17cf5bbd2036",
"metadata": {},
"source": [
"When using constellations or lists of satellites, use the `collect_multi_observations` function call. Note that it will collect observations for all defined instruments."
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "fa4ca60d-7bb8-4fa1-abd7-914efc9d146c",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"