Skip to content

Commit 73ee19c

Browse files
authored
Merge pull request #48 from ESA-PhiLab/develop
merge latest developments
2 parents f9e629e + 091135b commit 73ee19c

File tree

5 files changed

+36
-24
lines changed

5 files changed

+36
-24
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:18.04
22

33
LABEL maintainer="Petr Sevcik, EOX"
4-
LABEL OpenSARToolkit='0.10.1'
4+
LABEL OpenSARToolkit='0.11.1'
55

66
# set work directory to home and download snap
77
WORKDIR /home/ost
@@ -10,8 +10,8 @@ WORKDIR /home/ost
1010
COPY snap8.varfile $HOME
1111

1212
# update variables
13-
ENV OTB_VERSION="7.1.0" \
14-
TBX_VERSION="7" \
13+
ENV OTB_VERSION="7.3.0" \
14+
TBX_VERSION="8" \
1515
TBX_SUBVERSION="0"
1616
ENV TBX="esa-snap_sentinel_unix_${TBX_VERSION}_${TBX_SUBVERSION}.sh" \
1717
SNAP_URL="http://step.esa.int/downloads/${TBX_VERSION}.${TBX_SUBVERSION}/installers" \

ost/graphs/S1_SLC2ARD/S1_SLC_TNR_CalBeta_Deb_ML_TF_Sub.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@
7070
<demResamplingMethod>${dem_resampling}</demResamplingMethod>
7171
<externalDEMFile>${dem_file}</externalDEMFile>
7272
<externalDEMNoDataValue>${dem_nodata}</externalDEMNoDataValue>
73+
<externalDEMApplyEGM>${egm_correction}</externalDEMApplyEGM>
74+
<outputSimulatedImage>false</outputSimulatedImage>
7375
<additionalOverlap>0.15</additionalOverlap>
7476
<oversamplingMultiple>1.5</oversamplingMultiple>
75-
<outputSimulatedImage>false</outputSimulatedImage>
7677
</parameters>
7778
</node>
7879
<node id="Subset">

ost/s1/burst_to_ard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def create_coherence_layers(
283283

284284
# run co-registration
285285
try:
286-
slc.coreg2(
286+
slc.coreg(
287287
master_import, slave_import, out_coreg, coreg_log, config_dict
288288
)
289289
except (GPTRuntimeError, NotValidFileError) as error:

ost/s1/refine_inventory.py

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ def _remove_double_entries(inventory_df):
3737
)['ingestiondate'].transform(max) == inventory_df['ingestiondate']
3838

3939
# re-initialize GDF geometry due to groupby function
40-
crs = fiona.crs.from_epsg(4326)
41-
gdf = gpd.GeoDataFrame(inventory_df[idx], geometry='geometry', crs=crs)
40+
gdf = gpd.GeoDataFrame(
41+
inventory_df[idx], geometry='geometry', crs='epsg:4326'
42+
)
43+
4244
logger.info(
4345
f'{len(inventory_df[idx])} frames remain after double entry removal'
4446
)
@@ -91,7 +93,7 @@ def _handle_equator_crossing(inventory_df):
9193
crossing the equator the relative orbit will increase by 1.
9294
9395
This routine checks for the appearance of such kind and unifies the
94-
relativeorbitnumbers so that the inventory is complinat with the
96+
relativeorbit numbers so that the inventory is compliant with the
9597
subsequent batch processing routines of OST
9698
9799
Args:
@@ -247,7 +249,8 @@ def _remove_incomplete_tracks(aoi_gdf, inventory_df):
247249
out_frame = out_frame.append(gdf_date)
248250

249251
logger.info(
250-
f'{len(out_frame)} frames remain after removal of non-full AOI crossing'
252+
f' {len(out_frame)} frames remain after'
253+
f' removal of non-full AOI crossing'
251254
)
252255
return out_frame
253256

@@ -279,9 +282,10 @@ def _handle_non_continous_swath(inventory_df):
279282

280283
for date in dates:
281284

282-
subdf = inventory_df[(inventory_df['acquisitiondate'] == date) &
283-
(inventory_df['relativeorbit'] == track)
284-
].sort_values('slicenumber')
285+
subdf = inventory_df[
286+
(inventory_df['acquisitiondate'] == date) &
287+
(inventory_df['relativeorbit'] == track)
288+
].sort_values('slicenumber')
285289

286290
if (len(subdf) <= int(subdf.slicenumber.max()) -
287291
int(subdf.slicenumber.min())):
@@ -320,8 +324,9 @@ def _forward_search(aoi_gdf, inventory_df, area_reduce=0):
320324
out_frame = gpd.GeoDataFrame(columns=inventory_df.columns)
321325

322326
# loop through dates
323-
for date in sorted(inventory_df['acquisitiondate'].unique(),
324-
reverse=False):
327+
for date in sorted(
328+
inventory_df['acquisitiondate'].unique(), reverse=False
329+
):
325330

326331
# set starting date for curent mosaic
327332
if start_date is None:
@@ -391,8 +396,10 @@ def _backward_search(aoi_gdf, inventory_df, datelist, area_reduce=0):
391396
for dates in datelist:
392397

393398
# extract scenes for single mosaics
394-
gdf = inventory_df[(inventory_df['acquisitiondate'] <= dates[1]) &
395-
(inventory_df['acquisitiondate'] >= dates[0])]
399+
gdf = inventory_df[
400+
(inventory_df['acquisitiondate'] <= dates[1]) &
401+
(inventory_df['acquisitiondate'] >= dates[0])
402+
]
396403

397404
# we create an emtpy list and fill with tracks used for the mosaic,
398405
# so they are not used twice
@@ -413,12 +420,15 @@ def _backward_search(aoi_gdf, inventory_df, datelist, area_reduce=0):
413420
included_tracks.append(track)
414421

415422
# get all footprints for each date and track
416-
track_gdf = gdf[(gdf['acquisitiondate'] == date) &
417-
(gdf['relativeorbit'] == track)]
423+
track_gdf = gdf[
424+
(gdf['acquisitiondate'] == date) &
425+
(gdf['relativeorbit'] == track)
426+
]
418427

419428
# re-initialize GDF due to groupby fucntion
420-
track_gdf = gpd.GeoDataFrame(track_gdf,
421-
geometry='geometry')
429+
track_gdf = gpd.GeoDataFrame(
430+
track_gdf, geometry='geometry'
431+
)
422432

423433
# get a unified geometry for date/track combination
424434
union = track_gdf.geometry.unary_union
@@ -520,7 +530,8 @@ def search_refinement(
520530
(inventory_df['orbitdirection'] == orb)]
521531

522532
logger.info('{} frames for {} tracks in {} polarisation.'.format(
523-
len(inv_df_sorted), orb, pol))
533+
len(inv_df_sorted), orb, pol)
534+
)
524535

525536
# calculate intersected area
526537
inter = aoi_gdf.geometry.intersection(inv_df_sorted.unary_union)

ost/s1/slc_wrappers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def calibration(
189189
:param outfile:
190190
:param logfile:
191191
:param config_dict:
192-
:param region:
193192
:return:
194193
"""
195194

@@ -198,9 +197,10 @@ def calibration(
198197
cpus = config_dict['snap_cpu_parallelism']
199198
dem_dict = ard['dem']
200199
region = ''
200+
201201
# calculate Multi-Look factors
202202
azimuth_looks = 1 # int(np.floor(ard['resolution'] / 10 ))
203-
range_looks = 5 # int(azimuth_looks * 5)
203+
range_looks = 6 # int(azimuth_looks * 5)
204204

205205
# construct command dependent on selected product type
206206
if ard['product_type'] == 'RTC-gamma0':
@@ -220,6 +220,7 @@ def calibration(
220220
f"-Pdem_file=\'{dem_dict['dem_file']}\' "
221221
f"-Pdem_nodata={dem_dict['dem_nodata']} "
222222
f"-Pdem_resampling={dem_dict['dem_resampling']} "
223+
f"-Pegm_correction={dem_dict['egm_correction']} "
223224
f"-Pregion=\'{region}\' "
224225
f"-Pinput={str(infile)} "
225226
f"-Poutput={str(outfile)}"
@@ -311,7 +312,6 @@ def coreg(master, slave, outfile, logfile, config_dict):
311312
command = (
312313
f'{GPT_FILE} Back-Geocoding -x -q {2*cpus} '
313314
f'-PdemName=\'{dem_dict["dem_name"]}\' '
314-
#f'-PdemName=\'SRTM 3Sec\' '
315315
f'-PdemResamplingMethod=\'{dem_dict["dem_resampling"]}\' '
316316
f'-PexternalDEMFile=\'{dem_dict["dem_file"]}\' '
317317
f'-PexternalDEMNoDataValue=\'{dem_dict["dem_nodata"]}\' '

0 commit comments

Comments
 (0)