Use case 1: selecting bursts
Notebook setup
[22]:
%matplotlib inline
%load_ext autoreload
%autoreload 2
The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
[23]:
import sys
sys.path.append("../..")
[24]:
from s1etad import Sentinel1Etad
Open the dataset
[25]:
filename = (
"data/"
"S1A_IW_ETA__AXDV_20230806T211729_20230806T211757_049760_05FBCB_9DD6.SAFE"
)
[26]:
eta = Sentinel1Etad(filename)
[27]:
eta
[27]:
Sentinel1Etad("data/S1A_IW_ETA__AXDV_20230806T211729_20230806T211757_049760_05FBCB_9DD6.SAFE") # 0x738f016925d0
Number of Sentinel-1 slices: 1
Sentinel-1 products list:
S1A_IW_SLC__1SDV_20230806T211729_20230806T211757_049760_05FBCB_BC56.SAFE
Number of swaths: 3
Swath list: IW1, IW2, IW3
Azimuth time:
min: 2023-08-06 21:17:29.208211
max: 2023-08-06 21:17:57.184751
Range time:
min: 0.0053335639608434815
max: 0.006389868212274445
Grid sampling:
x: 8.131672451354599e-07
y: 0.02932551319648094
unit: s
Grid spacing:
x: 200.0
y: 200.0
unit: m
Processing settings:
troposphericDelayCorrection: True
troposphericDelayCorrectionGradient: True
ionosphericDelayCorrection: True
solidEarthTideCorrection: True
oceanTidalLoadingCorrection: True
bistaticAzimuthCorrection: True
dopplerShiftRangeCorrection: True
FMMismatchAzimuthCorrection: True
Selecting the burst by filtering in time
The availability of the burst catalogue, allows to perform queries and filter the burst by performing time selection using the first_time and last_time keywords of the query_burst method.
If no time is provided then all the burst are selected:
[28]:
df = eta.query_burst()
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 28
[28]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:29.208211000 | 2023-08-06 21:17:32.346040912 |
| 10 | 2 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:30.146627422 | 2023-08-06 21:17:33.313782847 |
| 19 | 3 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:31.114369357 | 2023-08-06 21:17:34.310850296 |
| 1 | 4 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:31.964809240 | 2023-08-06 21:17:35.131964665 |
| 11 | 5 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:32.903225662 | 2023-08-06 21:17:36.099706601 |
It is possible to reduce the selection by start time in this case the stop time is the last available burst:
[29]:
import dateutil
first_time = dateutil.parser.parse("2023-08-06T21:17:32.013300")
df = eta.query_burst(first_time=first_time)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 24
[29]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 11 | 5 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:32.903225662 | 2023-08-06 21:17:36.099706601 |
| 20 | 6 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:33.870967598 | 2023-08-06 21:17:37.067448536 |
| 2 | 7 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:34.721407480 | 2023-08-06 21:17:37.888562906 |
| 12 | 8 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:35.659823903 | 2023-08-06 21:17:38.826979328 |
| 21 | 9 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:36.627565838 | 2023-08-06 21:17:39.794721263 |
It is possible to reduce the selection by the stop time in this case the start time is the first available burst:
[30]:
last_time = dateutil.parser.parse("2023-08-06T21:17:54.071000")
df = eta.query_burst(last_time=last_time)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 24
[30]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:29.208211000 | 2023-08-06 21:17:32.346040912 |
| 10 | 2 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:30.146627422 | 2023-08-06 21:17:33.313782847 |
| 19 | 3 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:31.114369357 | 2023-08-06 21:17:34.310850296 |
| 1 | 4 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:31.964809240 | 2023-08-06 21:17:35.131964665 |
| 11 | 5 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:32.903225662 | 2023-08-06 21:17:36.099706601 |
It is possible to reduce the selection by the start and stop time:
[31]:
first_time = dateutil.parser.parse("2023-08-06T21:17:32.013300")
last_time = dateutil.parser.parse("2023-08-06T21:17:54.071000")
# query the catalogues for of all the swaths
df = eta.query_burst(first_time=first_time, last_time=last_time)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 20
[31]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 11 | 5 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:32.903225662 | 2023-08-06 21:17:36.099706601 |
| 20 | 6 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:33.870967598 | 2023-08-06 21:17:37.067448536 |
| 2 | 7 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:34.721407480 | 2023-08-06 21:17:37.888562906 |
| 12 | 8 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:35.659823903 | 2023-08-06 21:17:38.826979328 |
| 21 | 9 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:36.627565838 | 2023-08-06 21:17:39.794721263 |
Selecting by swath (and time)
The time selection can be combined with a selection by swath using the swath keyword. If not used all the swath are used
[32]:
first_time = dateutil.parser.parse("2023-08-06T21:17:32.013300")
last_time = dateutil.parser.parse("2023-08-06T21:17:54.071000")
# query the catalogue for a subset of the swaths
df = eta.query_burst(first_time=first_time, last_time=last_time, swath="IW1")
print(f"Number of bursts: {len(df)}")
df
Number of bursts: 6
[32]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 2 | 7 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:34.721407480 | 2023-08-06 21:17:37.888562906 |
| 3 | 10 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:37.478005721 | 2023-08-06 21:17:40.645161146 |
| 4 | 13 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:40.234603961 | 2023-08-06 21:17:43.401759387 |
| 5 | 16 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:42.991202202 | 2023-08-06 21:17:46.158357627 |
| 6 | 19 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:45.747800442 | 2023-08-06 21:17:48.914955868 |
| 7 | 22 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:48.504398683 | 2023-08-06 21:17:51.671554108 |
Query the catalogue for a subset of the swaths:
[33]:
first_time = dateutil.parser.parse("2023-08-06T21:17:32.013300")
last_time = dateutil.parser.parse("2023-08-06T21:17:54.071000")
df = eta.query_burst(
first_time=first_time, last_time=last_time, swath=["IW1", "IW2"]
)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 13
[33]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 11 | 5 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:32.903225662 | 2023-08-06 21:17:36.099706601 |
| 2 | 7 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:34.721407480 | 2023-08-06 21:17:37.888562906 |
| 12 | 8 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:35.659823903 | 2023-08-06 21:17:38.826979328 |
| 3 | 10 | 1 | 1 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW1 | 2023-08-06 21:17:37.478005721 | 2023-08-06 21:17:40.645161146 |
| 13 | 11 | 1 | 2 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW2 | 2023-08-06 21:17:38.416422143 | 2023-08-06 21:17:41.612903082 |
Selecting by Sentinel-1 product name (swath and time)
The time selection can be combined with a selection by swath using the product_name keyword.
[34]:
first_time = dateutil.parser.parse("2023-08-06T21:17:32.013300")
last_time = dateutil.parser.parse("2023-08-06T21:17:54.071000")
product_name = (
"S1A_IW_SLC__1SDV_20230806T211729_20230806T211757_049760_05FBCB_BC56.SAFE"
)
df = eta.query_burst(
first_time=first_time,
last_time=last_time,
product_name=product_name,
swath=["IW3"],
)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 7
[34]:
| bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
|---|---|---|---|---|---|---|---|
| 20 | 6 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:33.870967598 | 2023-08-06 21:17:37.067448536 |
| 21 | 9 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:36.627565838 | 2023-08-06 21:17:39.794721263 |
| 22 | 12 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:39.384164079 | 2023-08-06 21:17:42.580645017 |
| 23 | 15 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:42.140762319 | 2023-08-06 21:17:45.337243258 |
| 24 | 18 | 1 | 3 | S1A_IW_SLC__1SDV_20230806T211729_20230806T2117... | IW3 | 2023-08-06 21:17:44.897360560 | 2023-08-06 21:17:48.064515985 |