Skip to content

Commit dd2d064

Browse files
committed
re-formatting
1 parent 8718973 commit dd2d064

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

ost/Project.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,8 @@ def __init__(
254254
if product_type in ["*", "RAW", "SLC", "GRD"]:
255255
self.product_type = product_type
256256
else:
257-
raise ValueError(
258-
"Product type must be one out of '*', 'RAW', 'SLC', 'GRD'"
259-
)
257+
raise ValueError("Product type must be one out of '*', 'RAW', "
258+
"'SLC', 'GRD'")
260259

261260
# ------------------------------------------
262261
# 3 Check and set beam mode

ost/helpers/copdem.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919

2020

2121
def download_copdem_tile(tile_id):
22+
2223
# path to snaps aux folder
23-
#snap_aux = Path.home() / "bucket" / "snap_aux" / "auxdata" / "dem" / "Copernicus 30m Global DEM"
24+
# snap_aux = Path.home() / "bucket" / "snap_aux" / "auxdata" / "dem" / "Copernicus 30m Global DEM"
2425
snap_aux = Path.home() / ".snap" / "auxdata" / "dem" / "Copernicus 30m Global DEM"
2526

2627
if not snap_aux.exists():
@@ -83,13 +84,13 @@ def download_copdem(aoi):
8384
UserWarning)
8485

8586
copdem = gpd.read_file(OST_ROOT / "auxdata" / "copdem30tiles.gpkg")
86-
copdem['tile_id'] = copdem['id']
87+
copdem["tile_id"] = copdem["id"]
8788
aoi_gdf = vec.wkt_to_gdf(aoi)
8889
aoi_gdf["geometry"] = aoi_gdf.geometry.buffer(1)
8990
overlap_df = gpd.overlay(copdem, aoi_gdf, how="intersection")
9091

9192
iter_list = []
92-
for file in overlap_df['tile_id'].values:
93+
for file in overlap_df["tile_id"].values:
9394
iter_list.append(file)
9495
# download_copdem_tile(file)### fro debugging
9596

@@ -98,4 +99,4 @@ def download_copdem(aoi):
9899

99100
for task in executor.as_completed(func=download_copdem_tile,
100101
iterable=iter_list):
101-
task.result()
102+
task.result()

ost/s1/burst_inventory.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ def burst_extract(scene_id, track, acq_date, et_root):
121121
)
122122

123123
geo_dict = {
124-
"SceneID": scene_id,
125-
"Track": track,
126-
"Date": acq_date,
127-
"SwathID": swath,
128-
"AnxTime": azi_anx_time,
129-
"BurstNr": i + 1,
130-
"geometry": loads(wkt),
124+
"SceneID": [scene_id],
125+
"Track": [track],
126+
"Date": [acq_date],
127+
"SwathID": [swath],
128+
"AnxTime": [azi_anx_time],
129+
"BurstNr": [i + 1],
130+
"geometry": [loads(wkt)],
131131
}
132132

133-
gdf = gdf.append(geo_dict, ignore_index=True)
133+
gdf = pd.concat([gdf, pd.DataFrame.from_dict(geo_dict)])
134134

135135
return gdf
136136

0 commit comments

Comments
 (0)