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__AXDV_20190805T162509_20190805T162536_017453_020D3A_____.SAFE'
[6]:
eta = Sentinel1Etad(filename)
[7]:
eta
[7]:
Sentinel1Etad("../../sample-products/S1B_IW_ETA__AXDV_20190805T162509_20190805T162536_017453_020D3A_____.SAFE")  # 0x7f8ccbe732d0
Sentinel-1 products list:
  S1B_IW_SLC__1ADV_20190805T162509_20190805T162536_017453_020D3A_A857.SAFE
Number of swaths: 3
Swath list: IW1, IW2, IW3
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: 27
[8]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
0 1 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:09.836779 2019-08-05 16:25:13.002336
9 2 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:10.757668 2019-08-05 16:25:13.952003
18 3 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:11.736113 2019-08-05 16:25:14.930448
1 4 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:12.570669 2019-08-05 16:25:15.736226
10 5 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:13.520336 2019-08-05 16:25:16.714671

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('2019-08-05T16:25:30.117898')

df = eta.query_burst(first_time=first_time)

print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 4
[9]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
25 24 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:31.017231 2019-08-05 16:25:34.240344
8 25 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:31.880565 2019-08-05 16:25:35.046122
17 26 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:32.830232 2019-08-05 16:25:36.024566
26 27 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:33.779899 2019-08-05 16:25:36.974233

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('2019-08-05T16:25:20.117899')

df = eta.query_burst(last_time=last_time)

print(f"Number of bursts: {len(df)}")
df.head()
Number of bursts: 8
[10]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
0 1 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:09.836779 2019-08-05 16:25:13.002336
9 2 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:10.757668 2019-08-05 16:25:13.952003
18 3 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:11.736113 2019-08-05 16:25:14.930448
1 4 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:12.570669 2019-08-05 16:25:15.736226
10 5 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:13.520336 2019-08-05 16:25:16.714671

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

[11]:
first_time = dateutil.parser.parse('2019-08-05T16:25:25.117898')
last_time =  dateutil.parser.parse('2019-08-05T16:25:29.117899')

# 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
23 18 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:25.520674 2019-08-05 16:25:28.715008

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('2019-08-05T16:25:00.117898')
last_time =  dateutil.parser.parse('2019-08-05T16:25:40.117899')

# 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: 9
[12]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
0 1 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:09.836779 2019-08-05 16:25:13.002336
1 4 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:12.570669 2019-08-05 16:25:15.736226
2 7 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:15.333337 2019-08-05 16:25:18.498893
3 10 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:18.096004 2019-08-05 16:25:21.261561
4 13 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:20.858672 2019-08-05 16:25:24.024229
5 16 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:23.621340 2019-08-05 16:25:26.786896
6 19 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:26.355230 2019-08-05 16:25:29.549564
7 22 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:29.117897 2019-08-05 16:25:32.283454
8 25 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:31.880565 2019-08-05 16:25:35.046122

Query the catalogue for a subset of the swaths:

[13]:
first_time = dateutil.parser.parse('2019-08-05T16:25:00.117898')
last_time =  dateutil.parser.parse('2019-08-05T16:25:40.117899')

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: 18
[13]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
0 1 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:09.836779 2019-08-05 16:25:13.002336
9 2 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:10.757668 2019-08-05 16:25:13.952003
1 4 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:12.570669 2019-08-05 16:25:15.736226
10 5 1 2 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW2 2019-08-05 16:25:13.520336 2019-08-05 16:25:16.714671
2 7 1 1 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW1 2019-08-05 16:25:15.333337 2019-08-05 16:25:18.498893

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('2019-08-05T16:25:00.117898')
last_time =  dateutil.parser.parse('2019-08-05T16:25:40.117899')

product_name='S1B_IW_SLC__1SDV_20190805T162509_20190805T162536_017453_020D3A_AAAA.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: 9
[14]:
bIndex pIndex sIndex productID swathID azimuthTimeMin azimuthTimeMax
18 3 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:11.736113 2019-08-05 16:25:14.930448
19 6 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:14.470003 2019-08-05 16:25:17.693115
20 9 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:17.232671 2019-08-05 16:25:20.427005
21 12 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:19.995338 2019-08-05 16:25:23.189673
22 15 1 3 S1B_IW_SLC__1ADV_20190805T162509_20190805T1625... IW3 2019-08-05 16:25:22.758006 2019-08-05 16:25:25.952341