Use case 1: selecting bursts
Notebook setup
[1]:
%matplotlib inline
%load_ext autoreload
%autoreload 2
[2]:
import sys
sys.path.append('../..')
[3]:
import numpy as np
import matplotlib.pyplot as plt
[4]:
import s1etad
from s1etad import Sentinel1Etad, ECorrectionType
Open the dataset
[5]:
filename = '../../sample-products/S1B_IW_ETA__AXDH_20200127T113414_20200127T113858_020002_025D72_0096.SAFE'
[6]:
eta = Sentinel1Etad(filename)
[7]:
eta
[7]:
Sentinel1Etad("../../sample-products/S1B_IW_ETA__AXDH_20200127T113414_20200127T113858_020002_025D72_0096.SAFE") # 0x7facce683490
Number of Sentinel-1 slices: 11
Sentinel-1 products list:
S1B_IW_SLC__1ADH_20200127T113414_20200127T113444_020002_025D72_FD42.SAFE
S1B_IW_SLC__1ADH_20200127T113442_20200127T113510_020002_025D72_FC8F.SAFE
S1B_IW_SLC__1ADH_20200127T113507_20200127T113534_020002_025D72_78DF.SAFE
S1B_IW_SLC__1ADH_20200127T113532_20200127T113559_020002_025D72_1ABB.SAFE
S1B_IW_SLC__1ADH_20200127T113557_20200127T113624_020002_025D72_6706.SAFE
S1B_IW_SLC__1ADH_20200127T113622_20200127T113649_020002_025D72_78F0.SAFE
S1B_IW_SLC__1ADH_20200127T113647_20200127T113715_020002_025D72_11FB.SAFE
S1B_IW_SLC__1ADH_20200127T113712_20200127T113739_020002_025D72_FCC6.SAFE
S1B_IW_SLC__1ADH_20200127T113737_20200127T113804_020002_025D72_1FED.SAFE
S1B_IW_SLC__1ADH_20200127T113802_20200127T113829_020002_025D72_C434.SAFE
S1B_IW_SLC__1ADH_20200127T113827_20200127T113858_020002_025D72_E443.SAFE
Number of swaths: 3
Swath list: IW1, IW2, IW3
Azimuth time:
min: 2020-01-27 11:34:14.475597
max: 2020-01-27 11:38:58.167033
Range time:
min: 0.005371080957826855
max: 0.006416814907377812
Grid sampling:
x: 8.081406101630269e-07
y: 0.028777788199999974
unit: s
Grid spacing:
x: 200.0
y: 200.0
unit: m
Processing settings:
troposphericDelayCorrection: True
ionosphericDelayCorrection: True
solidEarthTideCorrection: 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:
[8]:
df = eta.query_burst()
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 306
[8]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
---|---|---|---|---|---|---|---|
0 | 1 | 1 | 1 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW1 | 2020-01-27 11:34:14.475597000 | 2020-01-27 11:34:17.641153701 |
102 | 2 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:15.396486222 | 2020-01-27 11:34:18.619598500 |
204 | 3 | 1 | 3 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW3 | 2020-01-27 11:34:16.374931021 | 2020-01-27 11:34:19.569265511 |
1 | 4 | 1 | 1 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW1 | 2020-01-27 11:34:17.209486879 | 2020-01-27 11:34:20.403821369 |
103 | 5 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:18.159153889 | 2020-01-27 11:34:21.353488379 |
It is possible to reduce the selection by start time in this case the stop time is the last available burst:
[9]:
import dateutil
first_time = dateutil.parser.parse('2020-01-27T11:38:51.231586')
df = eta.query_burst(first_time=first_time)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 5
[9]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
---|---|---|---|---|---|---|---|
202 | 302 | 11 | 2 | S1B_IW_SLC__1ADH_20200127T113827_20200127T1138... | IW2 | 2020-01-27 11:38:51.231586119 | 2020-01-27 11:38:54.425920609 |
304 | 303 | 11 | 3 | S1B_IW_SLC__1ADH_20200127T113827_20200127T1138... | IW3 | 2020-01-27 11:38:52.181253129 | 2020-01-27 11:38:55.404365408 |
101 | 304 | 11 | 1 | S1B_IW_SLC__1ADH_20200127T113827_20200127T1138... | IW1 | 2020-01-27 11:38:53.044586775 | 2020-01-27 11:38:56.238921266 |
203 | 305 | 11 | 2 | S1B_IW_SLC__1ADH_20200127T113827_20200127T1138... | IW2 | 2020-01-27 11:38:53.994253786 | 2020-01-27 11:38:57.188588276 |
305 | 306 | 11 | 3 | S1B_IW_SLC__1ADH_20200127T113827_20200127T1138... | IW3 | 2020-01-27 11:38:54.943920797 | 2020-01-27 11:38:58.167033075 |
It is possible to reduce the selection by the stop time in this case the start time is the first available burst:
[10]:
last_time = dateutil.parser.parse('2020-01-27T11:34:20.403822')
df = eta.query_burst(last_time=last_time)
print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 4
[10]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
---|---|---|---|---|---|---|---|
0 | 1 | 1 | 1 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW1 | 2020-01-27 11:34:14.475597000 | 2020-01-27 11:34:17.641153701 |
102 | 2 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:15.396486222 | 2020-01-27 11:34:18.619598500 |
204 | 3 | 1 | 3 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW3 | 2020-01-27 11:34:16.374931021 | 2020-01-27 11:34:19.569265511 |
1 | 4 | 1 | 1 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW1 | 2020-01-27 11:34:17.209486879 | 2020-01-27 11:34:20.403821369 |
It is possible to reduce the selection by the start and stop time:
[11]:
first_time = dateutil.parser.parse('2020-01-27T11:34:17.209487')
last_time = dateutil.parser.parse('2020-01-27T11:34:21.353489')
# 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: 1
[11]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
---|---|---|---|---|---|---|---|
103 | 5 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:18.159153889 | 2020-01-27 11:34:21.353488379 |
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
[12]:
first_time = dateutil.parser.parse('2020-01-27T11:34:17.209487')
last_time = dateutil.parser.parse('2020-01-27T11:34:21.353489')
# 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: 0
[12]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax |
---|
Query the catalogue for a subset of the swaths:
[13]:
first_time = dateutil.parser.parse('2020-01-27T11:34:17.209487')
last_time = dateutil.parser.parse('2020-01-27T11:34:28.663047')
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: 6
[13]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
---|---|---|---|---|---|---|---|
103 | 5 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:18.159153889 | 2020-01-27 11:34:21.353488379 |
2 | 7 | 1 | 1 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW1 | 2020-01-27 11:34:19.972154546 | 2020-01-27 11:34:23.166489036 |
104 | 8 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:20.921821556 | 2020-01-27 11:34:24.116156047 |
3 | 10 | 1 | 1 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW1 | 2020-01-27 11:34:22.734822213 | 2020-01-27 11:34:25.929156703 |
105 | 11 | 1 | 2 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW2 | 2020-01-27 11:34:23.684489224 | 2020-01-27 11:34:26.878823714 |
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.
[14]:
first_time = dateutil.parser.parse('2020-01-27T11:34:30.159492')
last_time = dateutil.parser.parse('2020-01-27T11:34:56.260946')
product_name = 'S1B_IW_SLC__1ADH_20200127T113414_20200127T113444_020002_025D72_FD42.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: 4
[14]:
bIndex | pIndex | sIndex | productID | swathID | azimuthTimeMin | azimuthTimeMax | |
---|---|---|---|---|---|---|---|
210 | 21 | 1 | 3 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW3 | 2020-01-27 11:34:32.922159236 | 2020-01-27 11:34:36.116493726 |
211 | 24 | 1 | 3 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW3 | 2020-01-27 11:34:35.684826903 | 2020-01-27 11:34:38.879161393 |
212 | 27 | 1 | 3 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW3 | 2020-01-27 11:34:38.447494570 | 2020-01-27 11:34:41.641829060 |
213 | 30 | 1 | 3 | S1B_IW_SLC__1ADH_20200127T113414_20200127T1134... | IW3 | 2020-01-27 11:34:41.181384449 | 2020-01-27 11:34:44.404496728 |