Sentinel-1 Tools¶
interface for management of S1 Orbit State Vector (OSV) files |
|
Mask out Sentinel-1 image border noise. |
- class pyroSAR.S1.OSV(osvdir=None, timeout=300)[source]¶
Bases:
object
interface for management of S1 Orbit State Vector (OSV) files
input is a directory which is supposed to contain, or already contains, OSV files. Two subdirectories are expected and created otherwise: one for Precise Orbit Ephemerides (POE) named POEORB and one for Restituted Orbit (RES) files named RESORB
Using method
match()
the corresponding POE (priority) or RES file is returned for a timestamp. Timestamps are always handled in the format YYYYmmddTHHMMSS.- Parameters:
osvdir (str) – the directory to write the orbit files to
timeout (int or tuple or None) – the timeout in seconds for downloading OSV files as provided to
requests.get()
See also
- catch(sensor, osvtype='POE', start=None, stop=None, url_option=1)[source]¶
check a server for files
- Parameters:
The S1 mission(s):
’S1A’
’S1B’
[‘S1A’, ‘S1B’]
osvtype (str or list[str]) – the type of orbit files required
start (str or None) – the date to start searching for files in format YYYYmmddTHHMMSS
stop (str or None) – the date to stop searching for files in format YYYYmmddTHHMMSS
url_option (int) –
the OSV download URL option
- Returns:
the product dictionary of the remote OSV files, with href
- Return type:
- match(sensor, timestamp, osvtype='POE')[source]¶
return the corresponding OSV file for the provided sensor and time stamp. The file returned is one which covers the acquisition time and, if multiple exist, the one which was published last. In case a list of options is provided as osvtype, the file of higher accuracy (i.e. POE over RES) is returned.
- Parameters:
- Returns:
the best matching orbit file (overlapping time plus latest publication date)
- Return type:
- maxdate(osvtype='POE', datetype='stop')[source]¶
return the latest date of locally existing POE/RES files
- Parameters:
osvtype ({'POE', 'RES'}) – the type of orbit files required
datetype ({'publish', 'start', 'stop'}) – one of three possible date types contained in the OSV filename
- Returns:
a timestamp in format YYYYmmddTHHMMSS
- Return type:
- mindate(osvtype='POE', datetype='start')[source]¶
return the earliest date of locally existing POE/RES files
- Parameters:
osvtype ({'POE', 'RES'}) – the type of orbit files required
datetype ({'publish', 'start', 'stop'}) – one of three possible date types contained in the OSV filename
- Returns:
a timestamp in format YYYYmmddTHHMMSS
- Return type:
- retrieve(products, pbar=False)[source]¶
download a list of product dictionaries into the respective subdirectories, i.e. POEORB or RESORB
- pyroSAR.S1.removeGRDBorderNoise(scene, method='pyroSAR')[source]¶
Mask out Sentinel-1 image border noise. This function implements the method for removing GRD border noise as published by ESA [2] and implemented in SNAP and additionally adds further refinement of the result using an image border line simplification approach. In this approach the border between valid and invalid pixels is first simplified using the poly-line vertex reduction method by Visvalingam and Whyatt [4]. The line segments of the new border are then shifted until all pixels considered invalid before the simplification are again on one side of the line. See image below for further clarification.
- Parameters:
scene (pyroSAR.drivers.SAFE) – the Sentinel-1 scene object
method (str) –
the border noise removal method to be applied; one of the following:
’ESA’: the pure implementation as described by ESA
’pyroSAR’: the ESA method plus the custom pyroSAR refinement