pingmapper 5.0.8__tar.gz → 5.0.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pingmapper-5.0.8 → pingmapper-5.0.10}/PKG-INFO +1 -1
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/class_sonObj.py +34 -6
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/gui_main.py +18 -16
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/main_readFiles.py +40 -4
- pingmapper-5.0.10/pingmapper/version.py +1 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper.egg-info/PKG-INFO +1 -1
- pingmapper-5.0.8/pingmapper/version.py +0 -1
- {pingmapper-5.0.8 → pingmapper-5.0.10}/LICENSE +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/README.md +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/__init__.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/__main__.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/class_mapSubstrateObj.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/class_portstarObj.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/class_rectObj.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/class_sonObj_nadirgaptest.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/default_params.json +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/funcs_common.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/funcs_model.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/funcs_rectify.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/main_mapSubstrate.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/main_rectify.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/test_PINGMapper.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper/test_time.py +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper.egg-info/SOURCES.txt +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper.egg-info/dependency_links.txt +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper.egg-info/requires.txt +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/pingmapper.egg-info/top_level.txt +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/setup.cfg +0 -0
- {pingmapper-5.0.8 → pingmapper-5.0.10}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pingmapper
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.10
|
|
4
4
|
Summary: Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
|
|
5
5
|
Author: Cameron Bodine, Daniel Buscombe
|
|
6
6
|
Author-email: bodine.cs@gmail.email
|
|
@@ -1301,7 +1301,10 @@ class sonObj(object):
|
|
|
1301
1301
|
|
|
1302
1302
|
# Distance (in meters)
|
|
1303
1303
|
d = sonMeta['trk_dist'].to_numpy()
|
|
1304
|
-
d = np.max(d) - np.min(d)
|
|
1304
|
+
# d = np.max(d) - np.min(d)
|
|
1305
|
+
d = d[-1] - d[0]
|
|
1306
|
+
|
|
1307
|
+
|
|
1305
1308
|
|
|
1306
1309
|
pixM = sonMeta['pixM']
|
|
1307
1310
|
# Find most common pixel size
|
|
@@ -1313,11 +1316,36 @@ class sonObj(object):
|
|
|
1313
1316
|
# Distance in pix
|
|
1314
1317
|
d = round(d / pixM, 0).astype(int)
|
|
1315
1318
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1319
|
+
# to avoid oom errors
|
|
1320
|
+
rows = sonDat.shape[0]
|
|
1321
|
+
new_cols = d # your target width
|
|
1322
|
+
item_size = sonDat.itemsize # bytes per element
|
|
1323
|
+
|
|
1324
|
+
estimated_bytes = rows * new_cols * item_size
|
|
1325
|
+
estimated_MB = estimated_bytes / 1e6
|
|
1326
|
+
|
|
1327
|
+
available_bytes = psutil.virtual_memory().available
|
|
1328
|
+
available_MB = available_bytes / 1e6
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
mem_margin = 0.9
|
|
1332
|
+
safe_limit_MB = available_MB * (1 - mem_margin)
|
|
1333
|
+
|
|
1334
|
+
if d > 0 and estimated_MB < safe_limit_MB and new_cols<65500:
|
|
1335
|
+
sonDat = resize(
|
|
1336
|
+
sonDat,
|
|
1337
|
+
(rows, new_cols),
|
|
1338
|
+
mode='reflect',
|
|
1339
|
+
clip=True,
|
|
1340
|
+
preserve_range=True
|
|
1341
|
+
)
|
|
1342
|
+
if estimated_MB > safe_limit_MB:
|
|
1343
|
+
print(f"Resize skipped for chunk {chunk}: estimated {estimated_MB:.2f} MB exceeds safe limit of {safe_limit_MB:.2f} MB.")
|
|
1344
|
+
# Optionally: fallback to chunked resize or downsampling
|
|
1345
|
+
elif new_cols>65500:
|
|
1346
|
+
print(f"Resize skipped for chunk {chunk}: Maximum supported image dimension is 65500 pixels.")
|
|
1347
|
+
else:
|
|
1348
|
+
print(f"Resize skipped for chunk {chunk}: Vessel did not move.")
|
|
1321
1349
|
|
|
1322
1350
|
else:
|
|
1323
1351
|
sonDat = resize(sonDat,
|
|
@@ -763,24 +763,26 @@ def gui(batch: bool):
|
|
|
763
763
|
print('\n===========================================')
|
|
764
764
|
print('===========================================')
|
|
765
765
|
print('***** READING *****')
|
|
766
|
-
read_master_func(**params)
|
|
766
|
+
ss_chan_avail = read_master_func(**params)
|
|
767
767
|
# read_master_func(sonFiles, humFile, projDir, t, nchunk, exportUnknown, wcp, wcr, detectDepth, smthDep, adjDep, pltBedPick, threadCnt)
|
|
768
768
|
|
|
769
|
-
if
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
769
|
+
if ss_chan_avail:
|
|
770
|
+
|
|
771
|
+
if rect_wcp or rect_wcr or banklines or coverage or pred_sub or map_sub or export_poly:
|
|
772
|
+
print('\n===========================================')
|
|
773
|
+
print('===========================================')
|
|
774
|
+
print('***** RECTIFYING *****')
|
|
775
|
+
rectify_master_func(**params)
|
|
776
|
+
# rectify_master_func(sonFiles, humFile, projDir, nchunk, rect_wcp, rect_wcr, mosaic, threadCnt)
|
|
777
|
+
|
|
778
|
+
#==================================================
|
|
779
|
+
#==================================================
|
|
780
|
+
if pred_sub or map_sub or export_poly or pltSubClass:
|
|
781
|
+
print('\n===========================================')
|
|
782
|
+
print('===========================================')
|
|
783
|
+
print('***** MAPPING SUBSTRATE *****')
|
|
784
|
+
print("working on "+projDir)
|
|
785
|
+
map_master_func(**params)
|
|
784
786
|
|
|
785
787
|
gc.collect()
|
|
786
788
|
print("\n\nTotal Processing Time: ",datetime.timedelta(seconds = round(time.time() - start_time, ndigits=0)))
|
|
@@ -419,8 +419,34 @@ def read_master_func(logfilename='',
|
|
|
419
419
|
if son.beamName == 'ss_port' or son.beamName == 'ss_star':
|
|
420
420
|
ss_chan_avail.append(son)
|
|
421
421
|
if len(ss_chan_avail) == 0:
|
|
422
|
-
print('\n\nNo side-scan channels available. Aborting!')
|
|
423
|
-
sys.exit()
|
|
422
|
+
# print('\n\nNo side-scan channels available. Aborting!')
|
|
423
|
+
# sys.exit()
|
|
424
|
+
|
|
425
|
+
print('\n\nNo side-scan channels available!\nUpdating processing parameters as necessary...')
|
|
426
|
+
print('\nFiltering not avaialable...')
|
|
427
|
+
max_heading_deviation = 0
|
|
428
|
+
min_speed = 0
|
|
429
|
+
max_speed = 0
|
|
430
|
+
aoi = ''
|
|
431
|
+
time_table = ''
|
|
432
|
+
|
|
433
|
+
print('\nAuto depth picking not available...')
|
|
434
|
+
detectDep = 0
|
|
435
|
+
pltBedPick = False
|
|
436
|
+
|
|
437
|
+
print('\nShadow removal not available')
|
|
438
|
+
remShadow = 0
|
|
439
|
+
pred_sub = False
|
|
440
|
+
|
|
441
|
+
print('\nEGN not available...')
|
|
442
|
+
egn = False
|
|
443
|
+
|
|
444
|
+
print('\nWCO and WCM not available...')
|
|
445
|
+
wco = False
|
|
446
|
+
wcm = False
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
424
450
|
elif len(ss_chan_avail) == 1:
|
|
425
451
|
print('\n\nMaking copy of {} to ensure PINGMapper compatibility'.format(son.beamName))
|
|
426
452
|
origBeam = son.beamName
|
|
@@ -1021,8 +1047,12 @@ def read_master_func(logfilename='',
|
|
|
1021
1047
|
saveDepth = False
|
|
1022
1048
|
|
|
1023
1049
|
if saveDepth:
|
|
1024
|
-
|
|
1025
|
-
|
|
1050
|
+
|
|
1051
|
+
if ss_chan_avail:
|
|
1052
|
+
# Save detected depth to csv
|
|
1053
|
+
depDF = psObj._saveDepth(chunks, detectDep, smthDep, adjDep, instDepAvail)
|
|
1054
|
+
else:
|
|
1055
|
+
depDF = []
|
|
1026
1056
|
|
|
1027
1057
|
# Store depths in downlooking sonar files also
|
|
1028
1058
|
for son in sonObjs:
|
|
@@ -1501,3 +1531,9 @@ def read_master_func(logfilename='',
|
|
|
1501
1531
|
son._pickleSon()
|
|
1502
1532
|
gc.collect()
|
|
1503
1533
|
printUsage()
|
|
1534
|
+
|
|
1535
|
+
if len(ss_chan_avail) == 0:
|
|
1536
|
+
return False
|
|
1537
|
+
else:
|
|
1538
|
+
return True
|
|
1539
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '5.0.10'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pingmapper
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.10
|
|
4
4
|
Summary: Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
|
|
5
5
|
Author: Cameron Bodine, Daniel Buscombe
|
|
6
6
|
Author-email: bodine.cs@gmail.email
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '5.0.8'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|