Use case 1: selecting bursts

Notebook setup

[1]:
%matplotlib inline
%load_ext autoreload
%autoreload 2
[2]:
import sys

sys.path.append("../..")
[3]:
from s1etad import Sentinel1Etad

Open the dataset

[4]:
filename = (
    "data/"
    "S1B_IW_ETA__AXDV_20200124T221416_20200124T221444_019964_025C43_0A63.SAFE/"
)
[5]:
eta = Sentinel1Etad(filename)
[6]:
eta
[6]:
Sentinel1Etad("data/S1B_IW_ETA__AXDV_20200124T221416_20200124T221444_019964_025C43_0A63.SAFE")  # 0x7420bff1f0b0
Number of Sentinel-1 slices: 1
Sentinel-1 products list:
  S1B_IW_SLC__1ADV_20200124T221416_20200124T221444_019964_025C43_95FB.SAFE
Number of swaths: 3
Swath list: IW1, IW2, IW3
Azimuth time:
  min: 2020-01-24 22:14:16.480938
  max: 2020-01-24 22:14:44.428152
Range time:
  min: 0.005328684957372668
  max: 0.006383362874313361
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
  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:

[7]:
df = eta.query_burst()

print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 28
[7]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
0 1 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:16.480938000 2020-01-24 22:14:19.618767912
10 2 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:17.419354422 2020-01-24 22:14:20.586509847
19 3 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:18.357770844 2020-01-24 22:14:21.554251782
1 4 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:19.237536240 2020-01-24 22:14:22.375366152
11 5 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:20.175952662 2020-01-24 22:14:23.343108087

It is possible to reduce the selection by start time in this case the stop time is the last available burst:

[8]:
import dateutil

first_time = dateutil.parser.parse("2020-01-24 22:14:19.237536240")

df = eta.query_burst(first_time=first_time)

print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 25
[8]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
1 4 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:19.237536240 2020-01-24 22:14:22.375366152
11 5 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:20.175952662 2020-01-24 22:14:23.343108087
20 6 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:21.143694598 2020-01-24 22:14:24.310850023
2 7 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:21.994134480 2020-01-24 22:14:25.131964392
12 8 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:22.932550903 2020-01-24 22:14:26.099706328

It is possible to reduce the selection by the stop time in this case the start time is the first available burst:

[9]:
last_time = dateutil.parser.parse("2020-01-24 22:14:29.824047")

df = eta.query_burst(last_time=last_time)

print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 12
[9]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
0 1 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:16.480938000 2020-01-24 22:14:19.618767912
10 2 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:17.419354422 2020-01-24 22:14:20.586509847
19 3 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:18.357770844 2020-01-24 22:14:21.554251782
1 4 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:19.237536240 2020-01-24 22:14:22.375366152
11 5 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:20.175952662 2020-01-24 22:14:23.343108087

It is possible to reduce the selection by the start and stop time:

[10]:
first_time = dateutil.parser.parse("2020-01-24 22:14:19.237536240")
last_time = dateutil.parser.parse("2020-01-24 22:14:29.824047")

# 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: 9
[10]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
1 4 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:19.237536240 2020-01-24 22:14:22.375366152
11 5 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:20.175952662 2020-01-24 22:14:23.343108087
20 6 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:21.143694598 2020-01-24 22:14:24.310850023
2 7 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:21.994134480 2020-01-24 22:14:25.131964392
12 8 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:22.932550903 2020-01-24 22:14:26.099706328

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

[11]:
first_time = dateutil.parser.parse("2020-01-24 22:14:19.237536240")
last_time = dateutil.parser.parse("2020-01-24 22:14:29.824047")

# 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: 3
[11]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
1 4 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:19.237536240 2020-01-24 22:14:22.375366152
2 7 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:21.994134480 2020-01-24 22:14:25.131964392
3 10 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:24.750732721 2020-01-24 22:14:27.888562633

Query the catalogue for a subset of the swaths:

[12]:
first_time = dateutil.parser.parse("2020-01-24 22:14:19.237536240")
last_time = dateutil.parser.parse("2020-01-24 22:14:29.824047")

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
[12]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
1 4 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:19.237536240 2020-01-24 22:14:22.375366152
11 5 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:20.175952662 2020-01-24 22:14:23.343108087
2 7 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:21.994134480 2020-01-24 22:14:25.131964392
12 8 1 2 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW2 2020-01-24 22:14:22.932550903 2020-01-24 22:14:26.099706328
3 10 1 1 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW1 2020-01-24 22:14:24.750732721 2020-01-24 22:14:27.888562633

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.

[13]:
first_time = dateutil.parser.parse("2020-01-24 22:14:19.237536240")
last_time = dateutil.parser.parse("2020-01-24 22:14:29.824047")

product_name = (
    "S1B_IW_SLC__1ADV_20200124T221416_20200124T221444_019964_025C43_95FB.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: 3
[13]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
20 6 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:21.143694598 2020-01-24 22:14:24.310850023
21 9 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:23.900292838 2020-01-24 22:14:27.067448263
22 12 1 3 S1B_IW_SLC__1ADV_20200124T221416_20200124T2214... IW3 2020-01-24 22:14:26.656891079 2020-01-24 22:14:29.824046504