Skip to content

Commit ecf7327

Browse files
authored
Merge pull request #89 from 12rambau/main
change black line length to 110
2 parents 0d35c6f + c9d200e commit ecf7327

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+291
-829
lines changed

docs/source/example/S1_GRD_batch_TS.ipynb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,7 @@
172172
"end = \"2017-08-31\"\n",
173173
"\n",
174174
"# initialize the class to s1_grd instance\n",
175-
"s1_grd = Sentinel1Batch(\n",
176-
" project_dir=project_dir, aoi=aoi, start=start, end=end, product_type=\"GRD\"\n",
177-
")\n",
175+
"s1_grd = Sentinel1Batch(project_dir=project_dir, aoi=aoi, start=start, end=end, product_type=\"GRD\")\n",
178176
"\n",
179177
"# trigger the search\n",
180178
"s1_grd.search()\n",
@@ -200,9 +198,7 @@
200198
"metadata": {},
201199
"outputs": [],
202200
"source": [
203-
"df = s1_grd.inventory.pivot_table(\n",
204-
" index=[\"relativeorbit\", \"acquisitiondate\"], aggfunc=\"size\"\n",
205-
").reset_index()\n",
201+
"df = s1_grd.inventory.pivot_table(index=[\"relativeorbit\", \"acquisitiondate\"], aggfunc=\"size\").reset_index()\n",
206202
"df.pivot_table(index=\"relativeorbit\", aggfunc=\"size\").reset_index()"
207203
]
208204
},
@@ -261,9 +257,7 @@
261257
"key = \"DESCENDING_HH\"\n",
262258
"\n",
263259
"# we wrap the information of the length of our refined inventory in a print statement\n",
264-
"print(\n",
265-
" f\"The refined inventory holds {len(s1_grd.refined_inventory_dict[key])} acquisitions to process.\"\n",
266-
")\n",
260+
"print(f\"The refined inventory holds {len(s1_grd.refined_inventory_dict[key])} acquisitions to process.\")\n",
267261
"\n",
268262
"# we plot the full Inventory on a map\n",
269263
"s1_grd.plot_inventory(s1_grd.refined_inventory_dict[key], transparency=0.05)"
@@ -416,7 +410,7 @@
416410
"name": "python",
417411
"nbconvert_exporter": "python",
418412
"pygments_lexer": "ipython3",
419-
"version": "3.8.5"
413+
"version": "3.8.10"
420414
},
421415
"toc": {
422416
"base_numbering": 1,

docs/source/example/S1_GRD_batch_subset.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@
216216
"pprint(s1_grd.ard_parameters[\"time-series_ARD\"])\n",
217217
"\n",
218218
"# custimze some single scene ARD parameters\n",
219-
"s1_grd.ard_parameters[\"single_ARD\"][\n",
220-
" \"resolution\"\n",
221-
"] = 50 # reduce for processing time and disk space\n",
219+
"s1_grd.ard_parameters[\"single_ARD\"][\"resolution\"] = 50 # reduce for processing time and disk space\n",
222220
"s1_grd.ard_parameters[\"time-series_ARD\"][\"dtype_output\"] = \"uint8\""
223221
]
224222
},
@@ -263,9 +261,7 @@
263261
"metadata": {},
264262
"outputs": [],
265263
"source": [
266-
"raster.combine_timeseries(\n",
267-
" processing_dir=s1_grd.processing_dir, config_dict=s1_grd.config_dict, timescan=True\n",
268-
")"
264+
"raster.combine_timeseries(processing_dir=s1_grd.processing_dir, config_dict=s1_grd.config_dict, timescan=True)"
269265
]
270266
},
271267
{
@@ -317,7 +313,7 @@
317313
"name": "python",
318314
"nbconvert_exporter": "python",
319315
"pygments_lexer": "ipython3",
320-
"version": "3.8.5"
316+
"version": "3.8.10"
321317
},
322318
"toc": {
323319
"base_numbering": 1,

docs/source/example/S1_GRD_batch_tscan.ipynb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@
109109
"end = \"2019-04-30\"\n",
110110
"\n",
111111
"# initialize the class to s1_grd instance\n",
112-
"s1_grd = Sentinel1Batch(\n",
113-
" project_dir=project_dir, aoi=aoi, start=start, end=end, product_type=\"GRD\"\n",
114-
")\n",
112+
"s1_grd = Sentinel1Batch(project_dir=project_dir, aoi=aoi, start=start, end=end, product_type=\"GRD\")\n",
115113
"\n",
116114
"# trigger the search\n",
117115
"s1_grd.search()\n",
@@ -150,9 +148,9 @@
150148
"\n",
151149
"# search command\n",
152150
"key = \"ASCENDING_VVVH\"\n",
153-
"print(\n",
154-
" f\"Our refined inventory holds {len(s1_grd.refined_inventory_dict[key])} frames to process.\"\n",
155-
")\n",
151+
"nb_frames = len(s1_grd.refined_inventory_dict[key])\n",
152+
"print(f\"Our refined inventory holds {nb_frames} frames to process.\")\n",
153+
"\n",
156154
"# we plot the full Inventory on a map\n",
157155
"s1_grd.plot_inventory(s1_grd.refined_inventory_dict[key], transparency=0.1)"
158156
]
@@ -273,7 +271,7 @@
273271
"name": "python",
274272
"nbconvert_exporter": "python",
275273
"pygments_lexer": "ipython3",
276-
"version": "3.8.5"
274+
"version": "3.8.10"
277275
},
278276
"toc": {
279277
"base_numbering": 1,

docs/source/example/data_search_&_access.ipynb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@
171171
"\n",
172172
"# Uncomment below to see the list of folders inside the project directory (UNIX only):\n",
173173
"print(\"\")\n",
174-
"print(\n",
175-
" \"We use the linux ls command for listing the directories inside our project folder:\"\n",
176-
")\n",
174+
"print(\"We use the linux ls command for listing the directories inside our project folder:\")\n",
177175
"!ls {project_dir}"
178176
]
179177
},
@@ -321,11 +319,7 @@
321319
"print(\n",
322320
" \"-----------------------------------------------------------------------------------------------------------\"\n",
323321
")\n",
324-
"print(\n",
325-
" \" INFO: We found a total of {} products for our project definition\".format(\n",
326-
" len(ost_s1.inventory)\n",
327-
" )\n",
328-
")\n",
322+
"print(\" INFO: We found a total of {} products for our project definition\".format(len(ost_s1.inventory)))\n",
329323
"print(\n",
330324
" \"-----------------------------------------------------------------------------------------------------------\"\n",
331325
")\n",
@@ -459,7 +453,7 @@
459453
"name": "python",
460454
"nbconvert_exporter": "python",
461455
"pygments_lexer": "ipython3",
462-
"version": "3.8.5"
456+
"version": "3.8.10"
463457
},
464458
"toc": {
465459
"base_numbering": 1,

docs/source/example/first_S1_scene.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,7 @@
270270
"print(\n",
271271
" \"-----------------------------------------------------------------------------------------------------------\"\n",
272272
")\n",
273-
"print(\n",
274-
" \"Our ARD parameters dictionary contains 4 keys. For the moment, only single_ARD is relevant.\"\n",
275-
")\n",
273+
"print(\"Our ARD parameters dictionary contains 4 keys. For the moment, only single_ARD is relevant.\")\n",
276274
"print(\n",
277275
" \"-----------------------------------------------------------------------------------------------------------\"\n",
278276
")\n",
@@ -532,7 +530,7 @@
532530
"name": "python",
533531
"nbconvert_exporter": "python",
534532
"pygments_lexer": "ipython3",
535-
"version": "3.8.5"
533+
"version": "3.8.10"
536534
},
537535
"toc": {
538536
"base_numbering": 1,

docs/source/example/latest_S1_scene.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@
203203
"# ---------------------------------------------------\n",
204204
"\n",
205205
"# create s1Project class instance\n",
206-
"s1_project = Sentinel1(\n",
207-
" project_dir=project_dir, aoi=aoi, start=start, product_type=\"GRD\"\n",
208-
")\n",
206+
"s1_project = Sentinel1(project_dir=project_dir, aoi=aoi, start=start, product_type=\"GRD\")\n",
209207
"\n",
210208
"# search command\n",
211209
"s1_project.search()\n",
@@ -393,9 +391,7 @@
393391
},
394392
"outputs": [],
395393
"source": [
396-
"latest_scene.create_rgb(\n",
397-
" outfile=s1_project.processing_dir / f\"{latest_scene.start_date}.tif\"\n",
398-
")\n",
394+
"latest_scene.create_rgb(outfile=s1_project.processing_dir / f\"{latest_scene.start_date}.tif\")\n",
399395
"latest_scene.visualise_rgb(shrink_factor=1)"
400396
]
401397
}
@@ -421,7 +417,7 @@
421417
"name": "python",
422418
"nbconvert_exporter": "python",
423419
"pygments_lexer": "ipython3",
424-
"version": "3.8.5"
420+
"version": "3.8.10"
425421
},
426422
"toc": {
427423
"base_numbering": 1,

docs/source/example/tips_&_tricks.ipynb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,10 @@
167167
"delta_days = 60\n",
168168
"\n",
169169
"# we set start and end 60 days before, repsectively after event\n",
170-
"start = (\n",
171-
" datetime.strptime(target_day, \"%Y-%m-%d\") - timedelta(days=delta_days)\n",
172-
").strftime(\"%Y-%m-%d\")\n",
173-
"end = (datetime.strptime(target_day, \"%Y-%m-%d\") + timedelta(days=delta_days)).strftime(\n",
174-
" \"%Y-%m-%d\"\n",
175-
")\n",
170+
"date = datetime.strptime(target_day, \"%Y-%m-%d\")\n",
171+
"delta = timedelta(days=delta_days)\n",
172+
"start = (date - delta).strftime(\"%Y-%m-%d\")\n",
173+
"end = (date + delta).strftime(\"%Y-%m-%d\")\n",
176174
"\n",
177175
"print(start, end)"
178176
]
@@ -216,9 +214,9 @@
216214
"from ost.helpers.scihub import connect\n",
217215
"\n",
218216
"# create instance\n",
219-
"s1 = Sentinel1_Scene(\n",
220-
" \"S1A_IW_GRDH_1SDV_20141004T230354_20141004T230423_002686_002FFD_062B\"\n",
221-
")\n",
217+
"scene = \"S1A_IW_GRDH_1SDV_20141004T230354_20141004T230423_002686_002FFD_062B\"\n",
218+
"s1 = Sentinel1_Scene(scene)\n",
219+
"\n",
222220
"# connection to Scihub\n",
223221
"opener = connect()\n",
224222
"# heck online status\n",
@@ -297,7 +295,7 @@
297295
"name": "python",
298296
"nbconvert_exporter": "python",
299297
"pygments_lexer": "ipython3",
300-
"version": "3.8.5"
298+
"version": "3.8.10"
301299
},
302300
"toc": {
303301
"base_numbering": 1,

0 commit comments

Comments
 (0)