pingmapper 4.2.11__tar.gz → 4.2.13__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-4.2.11 → pingmapper-4.2.13}/PKG-INFO +1 -1
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/class_rectObj.py +8 -3
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/class_sonObj.py +16 -2
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/gui_main.py +8 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/main_readFiles.py +21 -2
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/main_rectify.py +8 -2
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/test_time.py +5 -1
- pingmapper-4.2.13/pingmapper/version.py +1 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper.egg-info/PKG-INFO +1 -1
- pingmapper-4.2.11/pingmapper/version.py +0 -1
- {pingmapper-4.2.11 → pingmapper-4.2.13}/LICENSE +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/README.md +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/__init__.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/__main__.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/class_mapSubstrateObj.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/class_portstarObj.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/default_params.json +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/funcs_common.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/funcs_model.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/funcs_rectify.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/main_mapSubstrate.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper/test_PINGMapper.py +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper.egg-info/SOURCES.txt +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper.egg-info/dependency_links.txt +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper.egg-info/requires.txt +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/pingmapper.egg-info/top_level.txt +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/setup.cfg +0 -0
- {pingmapper-4.2.11 → pingmapper-4.2.13}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pingmapper
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.13
|
|
4
4
|
Summary: Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
|
|
5
5
|
Author: Cameron Bodine
|
|
6
6
|
Author-email: bodine.cs@gmail.email
|
|
@@ -36,8 +36,13 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
36
36
|
PACKAGE_DIR = os.path.dirname(SCRIPT_DIR)
|
|
37
37
|
sys.path.append(PACKAGE_DIR)
|
|
38
38
|
|
|
39
|
+
# # For depug
|
|
40
|
+
# from funcs_common import *
|
|
41
|
+
# from class_sonObj import sonObj
|
|
42
|
+
|
|
39
43
|
from pingmapper.funcs_common import *
|
|
40
44
|
from pingmapper.class_sonObj import sonObj
|
|
45
|
+
|
|
41
46
|
from osgeo import gdal, ogr, osr
|
|
42
47
|
from osgeo_utils.gdal_sieve import gdal_sieve
|
|
43
48
|
from scipy.interpolate import splprep, splev
|
|
@@ -1366,11 +1371,11 @@ class rectObj(sonObj):
|
|
|
1366
1371
|
|
|
1367
1372
|
pix_m = self.pixM # Get pixel size
|
|
1368
1373
|
|
|
1369
|
-
xPixMax, yPixMax = df[xPix].max()
|
|
1374
|
+
xPixMax, yPixMax = int(df[xPix].max()), int(df[yPix].max())
|
|
1370
1375
|
|
|
1371
1376
|
# Get extent of chunk
|
|
1372
|
-
xMin, xMax = df[xCoord].min()
|
|
1373
|
-
yMin, yMax = df[yCoord].min()
|
|
1377
|
+
xMin, xMax = int(df[xCoord].min()), int(df[xCoord].max())
|
|
1378
|
+
yMin, yMax = int(df[yCoord].min()), int(df[yCoord].max())
|
|
1374
1379
|
|
|
1375
1380
|
# Setup outupt array
|
|
1376
1381
|
# Determine output shape dimensions
|
|
@@ -741,6 +741,14 @@ class sonObj(object):
|
|
|
741
741
|
for i in range(len(self.headIdx)):
|
|
742
742
|
if ~np.isnan(self.headIdx[i]):
|
|
743
743
|
ping_len = min(self.pingCnt[i].astype(int), self.pingMax)
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
# #### Do not commit!!!!
|
|
747
|
+
# # if self.beamName == 'ss_star' or self.beamName == 'ss_port':
|
|
748
|
+
# # ping_len *= 2
|
|
749
|
+
if not self.son8bit:
|
|
750
|
+
ping_len *= 2
|
|
751
|
+
|
|
744
752
|
headIDX = self.headIdx[i].astype(int)
|
|
745
753
|
son_offset = self.son_offset[i].astype(int)
|
|
746
754
|
# pingIdx = headIDX + self.headBytes # Determine byte offset to sonar returns
|
|
@@ -755,7 +763,13 @@ class sonObj(object):
|
|
|
755
763
|
buffer = buffer[::-1]
|
|
756
764
|
|
|
757
765
|
# Read the data
|
|
758
|
-
|
|
766
|
+
if self.son8bit:# and self.beamName != 'ss_star' and self.beamName != 'ss_port':
|
|
767
|
+
dat = np.frombuffer(buffer, dtype='>u1')
|
|
768
|
+
else:
|
|
769
|
+
try:
|
|
770
|
+
dat = np.frombuffer(buffer, dtype='>u2')
|
|
771
|
+
except:
|
|
772
|
+
dat = np.frombuffer(buffer[:-1], dtype='>u2')
|
|
759
773
|
|
|
760
774
|
try:
|
|
761
775
|
sonDat[:ping_len, i] = dat
|
|
@@ -764,7 +778,7 @@ class sonObj(object):
|
|
|
764
778
|
sonDat[:ping_len, i] = dat
|
|
765
779
|
|
|
766
780
|
file.close()
|
|
767
|
-
self.sonDat = sonDat
|
|
781
|
+
self.sonDat = sonDat.astype(np.uint8)
|
|
768
782
|
return
|
|
769
783
|
|
|
770
784
|
# ======================================================================
|
|
@@ -10,10 +10,17 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
10
10
|
PACKAGE_DIR = os.path.dirname(SCRIPT_DIR)
|
|
11
11
|
sys.path.append(PACKAGE_DIR)
|
|
12
12
|
|
|
13
|
+
# # For Debug
|
|
14
|
+
# from funcs_common import *
|
|
15
|
+
# from main_readFiles import read_master_func
|
|
16
|
+
# from main_rectify import rectify_master_func
|
|
17
|
+
# from main_mapSubstrate import map_master_func
|
|
18
|
+
|
|
13
19
|
from pingmapper.funcs_common import *
|
|
14
20
|
from pingmapper.main_readFiles import read_master_func
|
|
15
21
|
from pingmapper.main_rectify import rectify_master_func
|
|
16
22
|
from pingmapper.main_mapSubstrate import map_master_func
|
|
23
|
+
|
|
17
24
|
import json
|
|
18
25
|
import pandas as pd
|
|
19
26
|
|
|
@@ -73,6 +80,7 @@ def gui(batch: bool):
|
|
|
73
80
|
text_input = sg.Text('Recording to Process')
|
|
74
81
|
# in_input = sg.In(key='inFile', size=(80,1))
|
|
75
82
|
in_input = sg.In(key='inFile', size=(80,1), default_text=default_params['inFile'])
|
|
83
|
+
# browse_input = sg.FileBrowse(file_types=(("Sonar File", "*.DAT *.sl2 *.sl3 *.RSD *.svlog") ), initial_folder=os.path.dirname(default_params['inFile']))
|
|
76
84
|
browse_input = sg.FileBrowse(file_types=(("Sonar File", "*.DAT *.sl2 *.sl3 *.svlog") ), initial_folder=os.path.dirname(default_params['inFile']))
|
|
77
85
|
|
|
78
86
|
# Add to layout
|
|
@@ -44,14 +44,15 @@ sys.path.append(PACKAGE_DIR)
|
|
|
44
44
|
from pingmapper.funcs_common import *
|
|
45
45
|
from pingmapper.class_sonObj import sonObj
|
|
46
46
|
from pingmapper.class_portstarObj import portstarObj
|
|
47
|
+
|
|
47
48
|
import shutil
|
|
48
49
|
from doodleverse_utils.imports import *
|
|
49
50
|
|
|
50
51
|
from scipy.signal import savgol_filter
|
|
51
52
|
|
|
52
|
-
# sys.path.insert(0, r'
|
|
53
|
+
# sys.path.insert(0, r'Z:\UDEL\PythonRepos\PINGVerter')
|
|
53
54
|
|
|
54
|
-
from pingverter import hum2pingmapper, low2pingmapper, cerul2pingmapper
|
|
55
|
+
from pingverter import hum2pingmapper, low2pingmapper, cerul2pingmapper#, gar2pingmapper
|
|
55
56
|
|
|
56
57
|
import cv2
|
|
57
58
|
|
|
@@ -325,15 +326,26 @@ def read_master_func(logfilename='',
|
|
|
325
326
|
elif file_type == '.sl2' or file_type == '.sl3':
|
|
326
327
|
sonar_obj = low2pingmapper(inFile, projDir, nchunk, tempC, exportUnknown)
|
|
327
328
|
|
|
329
|
+
# # Prepare Garmin file for PINGMapper
|
|
330
|
+
# elif file_type == '.RSD':
|
|
331
|
+
# sonar_obj = gar2pingmapper(inFile, projDir, nchunk, tempC, exportUnknown)
|
|
332
|
+
|
|
328
333
|
# Prepare Cerulean file for PINGMapper
|
|
329
334
|
elif file_type == '.svlog':
|
|
330
335
|
sonar_obj = cerul2pingmapper(inFile, projDir, nchunk, tempC, exportUnknown)
|
|
331
336
|
detectDep = 1 # No depth in cerulean files, so set to Zheng et al. 2021
|
|
332
337
|
|
|
338
|
+
# Unknown
|
|
339
|
+
else:
|
|
340
|
+
print('\n\nERROR!\n\nFile type {} not supported at this time.'.format(file_type))
|
|
341
|
+
sys.exit()
|
|
342
|
+
|
|
333
343
|
####################
|
|
334
344
|
# Create son objects
|
|
335
345
|
####################
|
|
336
346
|
|
|
347
|
+
# print(sonar_obj)
|
|
348
|
+
|
|
337
349
|
# Get available beams and metadata
|
|
338
350
|
beamMeta = sonar_obj.beamMeta
|
|
339
351
|
|
|
@@ -359,6 +371,13 @@ def read_master_func(logfilename='',
|
|
|
359
371
|
son.isOnix = sonar_obj.isOnix
|
|
360
372
|
son.trans = sonar_obj.trans
|
|
361
373
|
son.humDat = sonar_obj.humDat
|
|
374
|
+
# if son.beamName == 'ss_port' or son.beamName == 'ss_star':
|
|
375
|
+
# son.son8bit = sonar_obj.son8bit
|
|
376
|
+
# else:
|
|
377
|
+
son.son8bit = sonar_obj.son8bit
|
|
378
|
+
|
|
379
|
+
# print(son.beamName, son.son8bit)
|
|
380
|
+
|
|
362
381
|
|
|
363
382
|
if pix_res_son == 0:
|
|
364
383
|
son.pix_res_son = 0
|
|
@@ -38,6 +38,12 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
38
38
|
PACKAGE_DIR = os.path.dirname(SCRIPT_DIR)
|
|
39
39
|
sys.path.append(PACKAGE_DIR)
|
|
40
40
|
|
|
41
|
+
# # For Debug
|
|
42
|
+
# from funcs_common import *
|
|
43
|
+
# from class_rectObj import rectObj
|
|
44
|
+
# from class_portstarObj import portstarObj
|
|
45
|
+
# from funcs_rectify import smoothTrackline
|
|
46
|
+
|
|
41
47
|
from pingmapper.funcs_common import *
|
|
42
48
|
from pingmapper.class_rectObj import rectObj
|
|
43
49
|
from pingmapper.class_portstarObj import portstarObj
|
|
@@ -412,7 +418,7 @@ def rectify_master_func(logfilename='',
|
|
|
412
418
|
print('\n\tExporting', len(chunks), 'GeoTiffs for', son.beamName)
|
|
413
419
|
# for i in chunks:
|
|
414
420
|
# son._rectSonRubber(i, filter, cog, wgs=False)
|
|
415
|
-
# sys.exit()
|
|
421
|
+
# # sys.exit()
|
|
416
422
|
Parallel(n_jobs= np.min([len(chunks), threadCnt]))(delayed(son._rectSonRubber)(i, filter, cog, wgs=False) for i in tqdm(range(len(chunks))))
|
|
417
423
|
son._cleanup()
|
|
418
424
|
gc.collect()
|
|
@@ -444,7 +450,7 @@ def rectify_master_func(logfilename='',
|
|
|
444
450
|
start_time = time.time()
|
|
445
451
|
print("\nMosaicing GeoTiffs...")
|
|
446
452
|
psObj = portstarObj(portstar)
|
|
447
|
-
if aoi or max_heading_deviation or min_speed or max_speed:
|
|
453
|
+
if aoi or max_heading_deviation or min_speed or max_speed or time_table:
|
|
448
454
|
psObj._createMosaicTransect(mosaic, overview, threadCnt, son=True, maxChunk=mosaic_nchunk, cog=cog)
|
|
449
455
|
else:
|
|
450
456
|
psObj._createMosaic(mosaic, overview, threadCnt, son=True, maxChunk=mosaic_nchunk)
|
|
@@ -17,5 +17,9 @@ converted_date = start_date + timedelta(seconds=custom_unix_time)
|
|
|
17
17
|
eastern = pytz.timezone("US/Eastern")
|
|
18
18
|
converted_date_eastern = converted_date.astimezone(eastern)
|
|
19
19
|
|
|
20
|
+
print(start_date)
|
|
21
|
+
print(unix_timestamp)
|
|
20
22
|
print("Custom Unix Start Time:", unix_timestamp)
|
|
21
|
-
print(
|
|
23
|
+
print(converted_date)
|
|
24
|
+
print("Converted Date and Time:", converted_date_eastern)
|
|
25
|
+
print(timedelta(seconds=custom_unix_time))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '4.2.13'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pingmapper
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.13
|
|
4
4
|
Summary: Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
|
|
5
5
|
Author: Cameron Bodine
|
|
6
6
|
Author-email: bodine.cs@gmail.email
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '4.2.11'
|
|
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
|