pingmapper 5.0.10__tar.gz → 5.0.12__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.10 → pingmapper-5.0.12}/PKG-INFO +1 -1
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/__main__.py +0 -2
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/class_rectObj.py +5 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/class_sonObj.py +91 -1
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/gui_main.py +1 -1
- pingmapper-5.0.12/pingmapper/version.py +1 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper.egg-info/PKG-INFO +1 -1
- pingmapper-5.0.10/pingmapper/version.py +0 -1
- {pingmapper-5.0.10 → pingmapper-5.0.12}/LICENSE +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/README.md +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/__init__.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/class_mapSubstrateObj.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/class_portstarObj.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/class_sonObj_nadirgaptest.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/default_params.json +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/funcs_common.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/funcs_model.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/funcs_rectify.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/main_mapSubstrate.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/main_readFiles.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/main_rectify.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/test_PINGMapper.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper/test_time.py +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper.egg-info/SOURCES.txt +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper.egg-info/dependency_links.txt +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper.egg-info/requires.txt +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/pingmapper.egg-info/top_level.txt +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/setup.cfg +0 -0
- {pingmapper-5.0.10 → pingmapper-5.0.12}/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.12
|
|
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
|
|
@@ -1988,6 +1988,11 @@ class rectObj(sonObj):
|
|
|
1988
1988
|
isChunk.iloc[chunk+1] = True
|
|
1989
1989
|
trkMeta = trkMeta[isChunk].reset_index(drop=False)
|
|
1990
1990
|
|
|
1991
|
+
# Set pixel resolution if 0
|
|
1992
|
+
if pix_res == 0:
|
|
1993
|
+
pix_res = trkMeta['pixM'].mode()[0]
|
|
1994
|
+
do_resize = False
|
|
1995
|
+
|
|
1991
1996
|
# Filter sonMetaDF by chunk
|
|
1992
1997
|
if not hasattr(self, 'sonMetaDF'):
|
|
1993
1998
|
self._loadSonMeta()
|
|
@@ -797,6 +797,94 @@ class sonObj(object):
|
|
|
797
797
|
self.sonDat = sonDat.astype(np.uint8)
|
|
798
798
|
return
|
|
799
799
|
|
|
800
|
+
# def _loadSonChunk(self, df):
|
|
801
|
+
# """
|
|
802
|
+
# Read pings and apply per-ping gain normalization.
|
|
803
|
+
# - Assumes gain index is in df['gain'] aligned with loop index i.
|
|
804
|
+
# - Uses table_value = (gidx - 255) * 137 and unit_scale to convert to physical units.
|
|
805
|
+
# - For 'dB' mode: undo applied gain by multiplying with 10^(-gain_dB/20).
|
|
806
|
+
# - For 'linear' mode: subtract the (scaled) offset: dat_corrected = dat - phys_value.
|
|
807
|
+
# """
|
|
808
|
+
|
|
809
|
+
# # Configurable defaults (set on self if desired)
|
|
810
|
+
# gain_mode = 'linear' # 'dB' or 'linear'
|
|
811
|
+
# unit_scale = 100.0 # divisor to convert table units -> dB or linear units
|
|
812
|
+
|
|
813
|
+
# # Only apply for RSD files (your earlier check)
|
|
814
|
+
# apply_gain = self.sonFile.lower().endswith(".rsd")
|
|
815
|
+
# sonDat = np.zeros((int(self.pingMax), len(self.pingCnt)), dtype=np.int32)
|
|
816
|
+
|
|
817
|
+
# with open(self.sonFile, "rb") as file:
|
|
818
|
+
# for i in range(len(self.headIdx)):
|
|
819
|
+
# if ~np.isnan(self.headIdx[i]):
|
|
820
|
+
# ping_len = min(int(self.pingCnt[i]), int(self.pingMax))
|
|
821
|
+
# if not self.son8bit:
|
|
822
|
+
# ping_len *= 2
|
|
823
|
+
|
|
824
|
+
# headIDX = int(self.headIdx[i])
|
|
825
|
+
# son_offset = int(self.son_offset[i])
|
|
826
|
+
# pingIdx = headIDX + son_offset
|
|
827
|
+
|
|
828
|
+
# file.seek(pingIdx)
|
|
829
|
+
# buffer = file.read(ping_len)
|
|
830
|
+
|
|
831
|
+
# if self.flip_port:
|
|
832
|
+
# buffer = buffer[::-1]
|
|
833
|
+
|
|
834
|
+
# # Read raw samples: big-endian in file per your original code
|
|
835
|
+
# if self.son8bit:
|
|
836
|
+
# dat = np.frombuffer(buffer, dtype=">u1").astype(np.float32)
|
|
837
|
+
# else:
|
|
838
|
+
# # read big-endian uint16, then convert to native-endian float32
|
|
839
|
+
# try:
|
|
840
|
+
# dat_be = np.frombuffer(buffer, dtype=">u2")
|
|
841
|
+
# except Exception:
|
|
842
|
+
# dat_be = np.frombuffer(buffer[:-1], dtype=">u2")
|
|
843
|
+
# # convert to native-endian 16-bit then to float
|
|
844
|
+
# dat = dat_be.astype(np.uint16).astype(np.float32)
|
|
845
|
+
|
|
846
|
+
# # Apply gain correction if appropriate
|
|
847
|
+
# if apply_gain and gain_mode in ("dB", "linear"):
|
|
848
|
+
# # read gain index from your df (ensure integer)
|
|
849
|
+
# try:
|
|
850
|
+
# gidx = int(df.iloc[i]["gain"])
|
|
851
|
+
# except Exception:
|
|
852
|
+
# gidx = 0
|
|
853
|
+
# gidx = max(0, min(255, gidx))
|
|
854
|
+
|
|
855
|
+
# # table value in raw units
|
|
856
|
+
# table_unit_value = (gidx - 255) * 137
|
|
857
|
+
# phys_value = table_unit_value / float(unit_scale)
|
|
858
|
+
|
|
859
|
+
# if gain_mode == "dB":
|
|
860
|
+
# # phys_value is gain in dB that was applied when recording.
|
|
861
|
+
# # To normalize, undo that gain: multiply by 10^(-gain_dB/20).
|
|
862
|
+
# scale = 10.0 ** (-phys_value / 20.0)
|
|
863
|
+
# dat_corr = dat * scale
|
|
864
|
+
# else:
|
|
865
|
+
# # Linear offset case: subtract the stored offset to undo it.
|
|
866
|
+
# dat_corr = dat - phys_value
|
|
867
|
+
# else:
|
|
868
|
+
# dat_corr = dat
|
|
869
|
+
|
|
870
|
+
# # Clip and store into integer array, keep dynamic range
|
|
871
|
+
# # Here we store into sonDat as int32 to avoid overflow during processing.
|
|
872
|
+
# n = len(dat_corr)
|
|
873
|
+
# sonDat[:n, i] = np.round(dat_corr).astype(np.int32)
|
|
874
|
+
|
|
875
|
+
# # Finalize sonDat dtype choice: keep float-like behavior downstream by using float32,
|
|
876
|
+
# # or map to uint8/uint16 if your pipeline expects those dtypes.
|
|
877
|
+
# if self.son8bit:
|
|
878
|
+
# # clip to 0..255 and save as uint8
|
|
879
|
+
# self.sonDat = np.clip(sonDat, 0, 255).astype(np.uint8)
|
|
880
|
+
# else:
|
|
881
|
+
# # preserve range as uint16 (clip to uint16) if desired
|
|
882
|
+
# self.sonDat = np.clip(sonDat, 0, 65535).astype(np.uint16)
|
|
883
|
+
|
|
884
|
+
# return
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
|
|
800
888
|
# ======================================================================
|
|
801
889
|
def _WC_mask(self, i, son=True):
|
|
802
890
|
'''
|
|
@@ -1344,8 +1432,10 @@ class sonObj(object):
|
|
|
1344
1432
|
# Optionally: fallback to chunked resize or downsampling
|
|
1345
1433
|
elif new_cols>65500:
|
|
1346
1434
|
print(f"Resize skipped for chunk {chunk}: Maximum supported image dimension is 65500 pixels.")
|
|
1347
|
-
|
|
1435
|
+
elif d == 0:
|
|
1348
1436
|
print(f"Resize skipped for chunk {chunk}: Vessel did not move.")
|
|
1437
|
+
else:
|
|
1438
|
+
pass
|
|
1349
1439
|
|
|
1350
1440
|
else:
|
|
1351
1441
|
sonDat = resize(sonDat,
|
|
@@ -113,7 +113,7 @@ def gui(batch: bool):
|
|
|
113
113
|
|
|
114
114
|
else:
|
|
115
115
|
text_project = sg.Text('Project Name', size=(15,1))
|
|
116
|
-
in_project = sg.InputText(key='projName', size=(50,1), default_text=
|
|
116
|
+
in_project = sg.InputText(key='projName', size=(50,1), default_text=default_params['projName'])
|
|
117
117
|
|
|
118
118
|
# Add to layout
|
|
119
119
|
layout.append([text_project, in_project])
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '5.0.12'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pingmapper
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.12
|
|
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.10'
|
|
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
|