Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heading filter breaks substrate mapping #142

Open
CameronBodine opened this issue Jan 14, 2025 · 9 comments
Open

Heading filter breaks substrate mapping #142

CameronBodine opened this issue Jan 14, 2025 · 9 comments
Assignees
Labels
0_Code for Zenhub Workspace Filtering bug Something isn't working end user issue - general bug Issues identified by end users end user issue - processing bug

Comments

@CameronBodine
Copy link
Owner

CameronBodine commented Jan 14, 2025

Describe the bug

The new heading filter workflow results in an error during the substrate prediction workflow. There is a mismatch between the size of the the shadow mask and the sonar chunk that is being predicted upon.

Click to see error
Error Thrown:
joblib.externals.loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 463, in _process_worker
    r = call_item()
        ^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 598, in __call__
    return [func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 108, in _detectSubstrate
    substratePred = self._predSubstrate(i, MODEL, N_DATA_BANDS, winO=1/3)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 153, in _predSubstrate
    son3Chunk, origDims, lOff, tOff = self._getSon3Chunk(i)
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 361, in _getSon3Chunk
    _ = self._SHW_crop(c, False)
        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_sonObj.py", line 2044, in _SHW_crop
    self._SHW_mask(i)
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_sonObj.py", line 2026, in _SHW_mask
    mask[v[0]:v[1], k] = 0
    ~~~~^^^^^^^^^^^^^^
IndexError: index 154 is out of bounds for axis 1 with size 154
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\gui_main.py", line 361, in gui
    map_master_func(**params)
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\main_mapSubstrate.py", line 398, in map_master_func
    Parallel(n_jobs=np.min([len(chunks), threadCnt]), verbose=10)(delayed(son._detectSubstrate)(i, USE_GPU) for i in chunks)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 2007, in __call__
    return output if self.return_generator else list(output)
                                                ^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1650, in _get_outputs
    yield from self._retrieve()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1754, in _retrieve
    self._raise_error_fast()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1789, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 745, in get_result
    return self._return_or_raise()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 763, in _return_or_raise
    raise self._result
IndexError: index 154 is out of bounds for axis 1 with size 154

To Reproduce

Steps to reproduce the behavior:

Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 40.0       |
| max_heading_distance : 10.0       |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 0          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : False      |
| son_colorMap         : Greys_r    |
| pred_sub             : True       |
| pltSubClass          : False      |
| map_sub              : True       |
| export_poly          : True       |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : True       |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
12.1  | 25.2  | 17.2 
________________________




Using instrument depth:

Done!
Time (s): 0.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.9  | 25.2  | 17.2 
________________________




Substrate mapping requires shadow removal
Setting remShadow==2...


Automatically detecting shadows for 14 chunks:
MODE: 2 | Remove shadows in far-field (river bankpick)...

Done!
Time (s): 27.4


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
17.8  | 62.5  | 42.6 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
14.0  | 62.5  | 42.6 
________________________



===========================================
===========================================
***** RECTIFYING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

Smoothing trackline...
Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
9.7   | 62.5  | 42.6 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 3.7


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
8.6   | 25.6  | 17.5 
________________________



Exporting coverage and trackline shapefiles:

Done!
Time (s): 0.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
14.1  | 25.7  | 17.5 
________________________



Rectifying and exporting GeoTiffs:

Done!
Time (s): 0.0


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.0  | 25.6  | 17.5 
________________________



Mosaicing GeoTiffs...
chunk_id
Done!
Time (s): 0.0


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
10.4  | 25.7  | 17.5 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.6  | 25.7  | 17.5 
________________________



===========================================
===========================================
***** MAPPING SUBSTRATE *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

Using existing smoothed trackline.


Automatically predicting and segmenting substrate...

	Predicting substrate for 15 ss_port chunks


!!!!!!!!!!!!!!!!!
An Error Occured.

Please consult the logfile at:
 C:\Users\cbodine\Desktop\RV-BB_testSmthTrk\logs\error_2025-01-14_0904.txt

Expected behavior

Substrate maps should be exported with the heading filter applied.

Screenshots

NA

Desktop (please complete the following information):

  • OS: Windows 11

Additional context

Resulted from #126
First reported by a user

@CameronBodine CameronBodine added bug Something isn't working 0_Code for Zenhub Workspace Filtering end user issue - general bug Issues identified by end users end user issue - processing bug labels Jan 14, 2025
@CameronBodine CameronBodine self-assigned this Jan 14, 2025
@CameronBodine
Copy link
Owner Author

CameronBodine commented Jan 14, 2025

I confirmed I can export sonar mosaics with heading filter applied [no shadow removal]:

image

Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 40.0       |
| max_heading_distance : 10.0       |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 0          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : True       |
| son_colorMap         : Greys_r    |
| pred_sub             : False      |
| pltSubClass          : False      |
| map_sub              : False      |
| export_poly          : False      |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : False      |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
14.4  | 28.0  | 19.1 
________________________




Using instrument depth:

Done!
Time (s): 0.9


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
15.4  | 28.1  | 19.1 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
16.4  | 28.0  | 19.1 
________________________



===========================================
===========================================
***** RECTIFYING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

Smoothing trackline...
Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
18.5  | 28.0  | 19.1 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 2.1


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
16.5  | 28.4  | 19.3 
________________________



Rectifying and exporting GeoTiffs:


	Exporting 15 GeoTiffs for ss_port


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
13.4  | 30.8  | 21.0 
________________________



	Exporting 15 GeoTiffs for ss_star


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
16.3  | 30.8  | 21.0 
________________________


Done!
Time (s): 11.5


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
20.9  | 30.9  | 21.1 
________________________



Mosaicing GeoTiffs...
chunk_id



port ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00000.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00001.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00002.tif']



port ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00003.tif']



port ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00004.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00005.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00006.tif']



port ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00007.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00008.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00009.tif']



port ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00010.tif']



port ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00011.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00012.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00013.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_port\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_port_00014.tif']



star ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00000.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00001.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00002.tif']



star ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00003.tif']



star ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00004.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00005.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00006.tif']



star ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00007.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00008.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00009.tif']



star ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00010.tif']



star ['C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00011.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00012.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00013.tif', 'C:\\Users\\cbodine\\Desktop\\RV-BB_testSmthTrk\\ss_star\\rect_wcr\\RV-BB_testSmthTrk_rect_wcr_ss_star_00014.tif']
Done!
Time (s): 9.0


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
19.9  | 31.2  | 21.2 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
15.8  | 31.2  | 21.2 
________________________




Total Processing Time:  0:00:32

@CameronBodine
Copy link
Owner Author

I receive the same error when trying to export sonar mosaic with shadow removal:

Click to see error
Error Thrown:
joblib.externals.loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 463, in _process_worker
    r = call_item()
        ^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 598, in __call__
    return [func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_rectObj.py", line 1261, in _rectSonParallel
    self._SHW_mask(chunk)
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_sonObj.py", line 2026, in _SHW_mask
    mask[v[0]:v[1], k] = 0
    ~~~~^^^^^^^^^^^^^^
IndexError: index 154 is out of bounds for axis 1 with size 154
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\gui_main.py", line 352, in gui
    rectify_master_func(**params)
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\main_rectify.py", line 524, in rectify_master_func
    Parallel(n_jobs= np.min([len(chunks), threadCnt]))(delayed(son._rectSonParallel)(i, filter, cog, wgs=False) for i in tqdm(range(len(chunks))))
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 2007, in __call__
    return output if self.return_generator else list(output)
                                                ^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1650, in _get_outputs
    yield from self._retrieve()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1754, in _retrieve
    self._raise_error_fast()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1789, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 745, in get_result
    return self._return_or_raise()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 763, in _return_or_raise
    raise self._result
IndexError: index 154 is out of bounds for axis 1 with size 154
Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 40.0       |
| max_heading_distance : 10.0       |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 1          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : True       |
| son_colorMap         : Greys_r    |
| pred_sub             : False      |
| pltSubClass          : False      |
| map_sub              : False      |
| export_poly          : False      |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : False      |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
13.9  | 24.7  | 16.9 
________________________




Using instrument depth:

Done!
Time (s): 0.9


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
17.4  | 24.7  | 16.9 
________________________




Automatically detecting shadows for 14 chunks:
MODE: 1 | Remove all shadows...

Done!
Time (s): 27.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
15.2  | 62.0  | 42.2 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
9.7   | 62.0  | 42.2 
________________________



===========================================
===========================================
***** RECTIFYING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

Smoothing trackline...
Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
10.6  | 61.9  | 42.2 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 3.7


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.3  | 25.1  | 17.1 
________________________



Rectifying and exporting GeoTiffs:


	Exporting 15 GeoTiffs for ss_port


!!!!!!!!!!!!!!!!!
An Error Occured.

Please consult the logfile at:
 C:\Users\cbodine\Desktop\RV-BB_testSmthTrk\logs\error_2025-01-14_0934.txt

@CameronBodine
Copy link
Owner Author

Moved the sonar log filtering before the depth and shadow workflows 4757ab2. Sonar mosaic was able to export:

image

Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 40.0       |
| max_heading_distance : 10.0       |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 1          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : True       |
| son_colorMap         : Greys_r    |
| pred_sub             : False      |
| pltSubClass          : False      |
| map_sub              : False      |
| export_poly          : False      |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : False      |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
13.3  | 24.9  | 17.0 
________________________




Filtering sonar log...

Done!
Time (s): 0.4


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
17.9  | 24.9  | 17.0 
________________________




Using instrument depth:

Done!
Time (s): 0.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
17.8  | 24.8  | 16.9 
________________________




Automatically detecting shadows for 15 chunks:
MODE: 1 | Remove all shadows...

Done!
Time (s): 28.1


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
8.9   | 64.8  | 44.1 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
5.1   | 64.8  | 44.1 
________________________



===========================================
===========================================
***** RECTIFYING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

Smoothing trackline...
Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
6.3   | 64.8  | 44.1 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 3.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
9.3   | 25.2  | 17.2 
________________________



Rectifying and exporting GeoTiffs:


	Exporting 15 GeoTiffs for ss_port


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
6.7   | 27.8  | 19.0 
________________________



	Exporting 15 GeoTiffs for ss_star


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
7.8   | 27.9  | 19.0 
________________________


Done!
Time (s): 11.9


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
15.3  | 27.9  | 19.0 
________________________



Mosaicing GeoTiffs...
Done!
Time (s): 8.6


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
13.9  | 27.9  | 19.0 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
12.6  | 27.9  | 19.0 
________________________




Total Processing Time:  0:01:02

@CameronBodine
Copy link
Owner Author

CameronBodine commented Jan 14, 2025

Set shadows to be removed and predict substrate, but received an error:

Click to see error
Error Thrown:
joblib.externals.loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 463, in _process_worker
    r = call_item()
        ^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 598, in __call__
    return [func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 108, in _detectSubstrate
    substratePred = self._predSubstrate(i, MODEL, N_DATA_BANDS, winO=1/3)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 180, in _predSubstrate
    est_label, softmax_score = doPredict(model, MODEL, sonWin, N_DATA_BANDS, NCLASSES, TARGET_SIZE, OTSU_THRESHOLD)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\funcs_model.py", line 157, in doPredict
    image, w, h, bigimage = seg_file2tensor(arr, N_DATA_BANDS, TARGET_SIZE, MODEL)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\funcs_model.py", line 220, in seg_file2tensor
    image = resize(bigimage,(TARGET_SIZE[0], TARGET_SIZE[1]), preserve_range=True, clip=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\skimage\transform\_warps.py", line 203, in resize
    out = ndi.zoom(
          ^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\scipy\ndimage\_interpolation.py", line 817, in zoom
    [int(round(ii * jj)) for ii, jj in zip(input.shape, zoom)])
         ^^^^^^^^^^^^^^
ValueError: cannot convert float NaN to integer
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\gui_main.py", line 361, in gui
    map_master_func(**params)
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\main_mapSubstrate.py", line 398, in map_master_func
    Parallel(n_jobs=np.min([len(chunks), threadCnt]), verbose=10)(delayed(son._detectSubstrate)(i, USE_GPU) for i in chunks)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 2007, in __call__
    return output if self.return_generator else list(output)
                                                ^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1650, in _get_outputs
    yield from self._retrieve()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1754, in _retrieve
    self._raise_error_fast()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1789, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 745, in get_result
    return self._return_or_raise()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 763, in _return_or_raise
    raise self._result
ValueError: cannot convert float NaN to integer

Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 40.0       |
| max_heading_distance : 10.0       |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 1          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : False      |
| son_colorMap         : Greys_r    |
| pred_sub             : True       |
| pltSubClass          : False      |
| map_sub              : True       |
| export_poly          : True       |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : False      |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
9.1   | 31.8  | 21.7 
________________________




Filtering sonar log...

Done!
Time (s): 0.4


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
10.2  | 31.8  | 21.7 
________________________




Using instrument depth:

Done!
Time (s): 0.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
12.6  | 31.8  | 21.7 
________________________




Automatically detecting shadows for 15 chunks:
MODE: 1 | Remove all shadows...

Done!
Time (s): 28.6


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
17.4  | 71.4  | 48.6 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
12.1  | 71.2  | 48.5 
________________________



===========================================
===========================================
***** MAPPING SUBSTRATE *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

No smoothed trackline available!
Smoothing trackline...
Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
10.2  | 71.1  | 48.4 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 8.6


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
26.1  | 33.5  | 22.8 
________________________




Automatically predicting and segmenting substrate...

	Predicting substrate for 15 ss_port chunks


!!!!!!!!!!!!!!!!!
An Error Occured.

Please consult the logfile at:
 C:\Users\cbodine\Desktop\RV-BB_testSmthTrk\logs\error_2025-01-14_1139.txt

This is a different error. The same error was reported by another individual on a different recording.

@CameronBodine
Copy link
Owner Author

If the heading filter is turned off, a substrate map is exported:

image

Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 0.0        |
| max_heading_distance : 0.0        |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 0          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : False      |
| son_colorMap         : Greys_r    |
| pred_sub             : True       |
| pltSubClass          : False      |
| map_sub              : True       |
| export_poly          : True       |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : False      |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
10.7  | 31.5  | 21.5 
________________________




Using instrument depth:

Done!
Time (s): 0.9


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
14.7  | 31.5  | 21.4 
________________________




Substrate mapping requires shadow removal
Setting remShadow==2...


Automatically detecting shadows for 14 chunks:
MODE: 2 | Remove shadows in far-field (river bankpick)...

Done!
Time (s): 26.9


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
25.3  | 67.4  | 45.9 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
20.2  | 67.2  | 45.8 
________________________



===========================================
===========================================
***** MAPPING SUBSTRATE *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

No smoothed trackline available!
Smoothing trackline...
Done!
Time (s): 0.3


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
18.2  | 67.1  | 45.7 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 8.0


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.4  | 28.4  | 19.4 
________________________




Automatically predicting and segmenting substrate...

	Predicting substrate for 14 ss_port chunks

	Predicting substrate for 14 ss_star chunks

Done!
Time (s): 50.9


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
14.3  | 41.2  | 28.1 
________________________


False


Mapping substrate classification...

	Mapping substrate classification. Processing 14 port and starboard pairs...

Done!
Time (s): 9.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
12.6  | 40.7  | 27.7 
________________________



Converting substrate rasters into shapefile...

	Creating vrt...

	Exporting to shapefile...

Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
9.4   | 40.7  | 27.7 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
6.8   | 40.7  | 27.7 
________________________




Total Processing Time:  0:01:46


Notably, when adding the heading filter workflow, the smooth trackline workflow was also updated (e7fc3be) to run from a new function. However, that function isn't called in main_mapSubstrate.py and is still hardcoded:

if smthTrk:
print("\nUsing existing smoothed trackline.")
else:
start_time = time.time()
print("\nNo smoothed trackline available!\nSmoothing trackline...")
# As side scan beams use same transducer/gps coords, we will smooth one
## beam's trackline and use for both. Use the beam with the most sonar records.
maxRec = 0 # Stores index of recording w/ most sonar records.
maxLen = 0 # Stores length of ping
for i, son in enumerate(mapObjs):
son._loadSonMeta() # Load ping metadata
sonLen = len(son.sonMetaDF) # Number of sonar records
if sonLen > maxLen:
maxLen = sonLen
maxRec = i
# Now we will smooth using sonar beam w/ most records.
son0 = mapObjs[maxRec]
sonDF = son0.sonMetaDF # Get ping metadata
# sDF = son._interpTrack(df=sonDF, dropDup=True, filt=filter, deg=3) # Smooth trackline and reinterpolate trackpoints along spline
sDF = pd.DataFrame()
for name, group in sonDF.groupby('transect'):
smoothed = son._interpTrack(df=group, dropDup=True, filt=filter, deg=3)
smoothed['transect'] = int(name)
sDF = pd.concat([sDF, smoothed], ignore_index=True)
del sonDF
####################################
####################################
# To remove gap between sonar tiles:
# For chunk > 0, use coords from previous chunks second to last ping
# and assign as current chunk's first ping coords
chunks = pd.unique(sDF['chunk_id'])
# i = 1
# while i <= max(chunks):
# # Get second to last row of previous chunk
# lastRow = sDF[sDF['chunk_id'] == i-1].iloc[[-2]]
# # Get index of first row of current chunk
# curRow = sDF[sDF['chunk_id'] == i].iloc[[0]]
# curRow = curRow.index[0]
# # Update current chunks first row from lastRow
# sDF.at[curRow, "lons"] = lastRow["lons"]
# sDF.at[curRow, "lats"] = lastRow["lats"]
# sDF.at[curRow, "utm_es"] = lastRow["utm_es"]
# sDF.at[curRow, "utm_ns"] = lastRow["utm_ns"]
# sDF.at[curRow, "cog"] = lastRow["cog"]
# i+=1
# del lastRow, curRow, i
i = 1
t = 0
while i <= max(chunks):
# Get second to last row of previous chunk
lastRow = sDF[sDF['chunk_id'] == i-1].iloc[[-2]]
# Get index of first row of current chunk
curRow = sDF[sDF['chunk_id'] == i].iloc[[0]]
curTransect = curRow['transect'].values[0]
curRow = curRow.index[0]
if curTransect == t:
# Update current chunks first row from lastRow
sDF.at[curRow, "lons"] = lastRow["lons"]
sDF.at[curRow, "lats"] = lastRow["lats"]
sDF.at[curRow, "utm_es"] = lastRow["utm_es"]
sDF.at[curRow, "utm_ns"] = lastRow["utm_ns"]
sDF.at[curRow, "cog"] = lastRow["cog"]
else:
t += 1
i+=1
del lastRow, curRow, i
son0.smthTrk = sDF # Store smoothed trackline coordinates in rectObj.
# Do positional correction
if x_offset != 0.0 or y_offset != 0.0:
son0._applyPosOffset(x_offset, y_offset)
# Update other channel with smoothed coordinates
# Determine which rectObj we need to update
for i, son in enumerate(mapObjs):
if i != maxRec:
son1 = son # rectObj to update
sDF = son0.smthTrk.copy() # Make copy of smoothed trackline coordinates
# Update with correct record_num
son1._loadSonMeta() # Load ping metadata
df = son1.sonMetaDF
sDF['chunk_id'] = df['chunk_id'] # Update chunk_id for smoothed coordinates
sDF['record_num'] = df['record_num'] # Update record_num for smoothed coordinates
son1.smthTrk = sDF # Store smoothed trackline coordinates in rectObj
del sDF, df, son0, son1
# Save smoothed trackline coordinates to file
for son in mapObjs:
outCSV = os.path.join(son.metaDir, "Trackline_Smth_"+son.beamName+".csv")
son.smthTrk.to_csv(outCSV, index=False, float_format='%.14f')
son.smthTrkFile = outCSV
son._cleanup()
del son, outCSV
print("Done!")
print("Time (s):", round(time.time() - start_time, ndigits=1))
gc.collect()
printUsage()
############################################################################
# Calculate range extent coordinates #
############################################################################
start_time = time.time()
print("\nCalculating, smoothing, and interpolating range extent coordinates...")
Parallel(n_jobs= np.min([len(mapObjs), threadCnt]), verbose=10)(delayed(son._getRangeCoords)(flip, filterRange) for son in mapObjs)
print("Done!")
print("Time (s):", round(time.time() - start_time, ndigits=1))
gc.collect()
printUsage()

@CameronBodine
Copy link
Owner Author

Made substrate mapping workflow smooth trackline using rectify_master_func even if not rectifying sonar imagery 106b194. This bypassed need for having trackline smoothing in main_mapSubstrate.py. PM was able to predict and export substrate map without the heading filter. Testing with heading filter applied to see if this change solved the issue.

@CameronBodine
Copy link
Owner Author

106b194 did not fix the issue (substrate mapping with heading filter applied).

Click to see error
Error Thrown:
joblib.externals.loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 463, in _process_worker
    r = call_item()
        ^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\externals\loky\process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 598, in __call__
    return [func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 108, in _detectSubstrate
    substratePred = self._predSubstrate(i, MODEL, N_DATA_BANDS, winO=1/3)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_mapSubstrateObj.py", line 180, in _predSubstrate
    est_label, softmax_score = doPredict(model, MODEL, sonWin, N_DATA_BANDS, NCLASSES, TARGET_SIZE, OTSU_THRESHOLD)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\funcs_model.py", line 157, in doPredict
    image, w, h, bigimage = seg_file2tensor(arr, N_DATA_BANDS, TARGET_SIZE, MODEL)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\funcs_model.py", line 220, in seg_file2tensor
    image = resize(bigimage,(TARGET_SIZE[0], TARGET_SIZE[1]), preserve_range=True, clip=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\skimage\transform\_warps.py", line 203, in resize
    out = ndi.zoom(
          ^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\scipy\ndimage\_interpolation.py", line 817, in zoom
    [int(round(ii * jj)) for ii, jj in zip(input.shape, zoom)])
         ^^^^^^^^^^^^^^
ValueError: cannot convert float NaN to integer
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\gui_main.py", line 361, in gui
    map_master_func(**params)
  File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\main_mapSubstrate.py", line 398, in map_master_func
    Parallel(n_jobs=np.min([len(chunks), threadCnt]), verbose=10)(delayed(son._detectSubstrate)(i, USE_GPU) for i in chunks)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 2007, in __call__
    return output if self.return_generator else list(output)
                                                ^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1650, in _get_outputs
    yield from self._retrieve()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1754, in _retrieve
    self._raise_error_fast()
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 1789, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 745, in get_result
    return self._return_or_raise()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\cbodine\miniconda3\envs\ping\Lib\site-packages\joblib\parallel.py", line 763, in _return_or_raise
    raise self._result
ValueError: cannot convert float NaN to integer

Click to see log
[]


 ***User Parameters***
| inFile               : Z:\UDEL\SonarLogs4Testing\MowLawn\short\Kab_2022-06-09_14.24.09_SideScanBackForth.sl2 |
| projDir              : C:\Users\cbodine\Desktop\RV-BB_testSmthTrk |
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : False      |
| fixNoDat             : False      |
| threadCnt            : 0.8        |
| aoi                  : False      |
| max_heading_deviation : 40.0       |
| max_heading_distance : 10.0       |
| min_speed            : 0.0        |
| max_speed            : 0.0        |
| pix_res_son          : 0.05       |
| pix_res_map          : 0.25       |
| x_offset             : 0.0        |
| y_offset             : 0.0        |
| egn                  : False      |
| egn_stretch          : 2          |
| egn_stretch_factor   : 0.5        |
| wcp                  : False      |
| wcr                  : False      |
| tileFile             : .jpg       |
| lbl_set              : 0          |
| spdCor               : 1.0        |
| maxCrop              : False      |
| remShadow            : 0          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : False      |
| rect_wcp             : False      |
| rect_wcr             : False      |
| son_colorMap         : Greys_r    |
| pred_sub             : True       |
| pltSubClass          : False      |
| map_sub              : True       |
| export_poly          : True       |
| map_class_method     : max        |
| map_predict          : 0          |
| mosaic_nchunk        : 0          |
| mosaic               : 1          |
| map_mosaic           : 0          |
| banklines            : False      |
| coverage             : False      |

===========================================
===========================================
***** READING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk
0        130kHz_210kHz
1        130kHz_210kHz
2        130kHz_210kHz
3               455kHz
4               455kHz
             ...      
34643           455kHz
34644           455kHz
34645    130kHz_210kHz
34646    130kHz_210kHz
34647    130kHz_210kHz
Name: frequency, Length: 34648, dtype: object

Summary of Ping Metadata:

B002 : ss_port
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 2               | 2               | 2.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 1               | 20785           | 10393.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B003 : ss_star
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 7568            | 72779280        | 36393424.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 7568            | 72779280        | 36393424.0      | True 
frame_size      | 2944            | 2944            | 2944.0          | True 
prev_frame_size | 1544            | 1544            | 1544.0          | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 24.384          | 24.384          | 24.384          | True 
hardware_time   | 722             | 1654802650      | 398205.522      | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.029   | True 
utm_n           | 6165253         | 6165450         | 6165358.705     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.391         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.0             | 0.0             | 0.0             | False
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.712           | 323.915         | 159.383         | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.368      | True 
n               | 5368931.474     | 5369062.424     | 5369001.697     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.017           | 0.017           | 0.017           | True 
trk_dist        | 0.237           | 622.569         | 283.915         | True 
beam            | 3               | 3               | 3.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 1544            | 1544            | 1544.0          | True 
record_num      | 2               | 20786           | 10394.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


B004 : ds_vhighfreq
Ping Count: 6929
______________________________________________________________________________
Attribute            | Minimum         | Maximum         | Average         | Valid
______________________________________________________________________________
index           | 6024            | 72777736        | 36391880.0      | True 
prev_primary_offset | 8               | 72771720        | 36385864.0      | True 
prev_secondary_offset | 0               | 0               | 0.0             | False
prev_downscan_offset | 6024            | 72777736        | 36391880.0      | True 
prev_left_sidescan_offset | 0               | 0               | 0.0             | False
prev_right_sidescan_offset | 0               | 0               | 0.0             | False
prev_sidescan_offset | 0               | 72768776        | 36382920.424    | True 
frame_size      | 1544            | 1544            | 1544.0          | True 
prev_frame_size | 656             | 656             | 656.0           | True 
ping_cnt        | 1400            | 1400            | 1400.0          | True 
id              | 0               | 6928            | 3464.0          | True 
min_range       | 0.0             | 0.0             | 0.0             | False
max_range       | 10.973          | 14.63           | 12.481          | True 
hardware_time   | 719             | 1654802650      | 398202.84       | True 
inst_dep_m      | 5.594           | 10.42           | 7.769           | True 
keel_depth_m    | 0.0             | 0.0             | 0.0             | False
speed_ms        | 1.001           | 2.733           | 1.916           | True 
water_temperature | 17.2            | 17.3            | 17.26           | True 
utm_e           | -10323772       | -10323466       | -10323572.027   | True 
utm_n           | 6165253         | 6165450         | 6165358.704     | True 
water_speed     | 0.0             | 0.0             | 0.0             | False
instr_heading   | 0.045           | 359.873         | 205.394         | True 
altitude        | 341.43          | 344.12          | 342.807         | True 
heading_magnetic | 0.059           | 359.996         | 201.074         | True 
flags           | 958             | 958             | 958.0           | True 
time_s          | 0.709           | 323.912         | 159.38          | True 
date            | 2022-06-09      | 2022-06-09      | -               | True 
time            | 19:24:10        | 19:29:33        | -               | True 
lat             | 48.474          | 48.475          | 48.474          | True 
lon             | -93.052         | -93.049         | -93.05          | True 
e               | 496156.194      | 496359.993      | 496289.369      | True 
n               | 5368931.474     | 5369062.424     | 5369001.696     | True 
tempC           | 10.0            | 10.0            | 10.0            | True 
transect        | 0               | 0               | 0.0             | True 
pixM            | 0.008           | 0.01            | 0.009           | True 
trk_dist        | 0.234           | 622.561         | 283.91          | True 
beam            | 4               | 4               | 4.0             | True 
f               | -1              | -1              | -1.0            | True 
f_min           | -1              | -1              | -1.0            | True 
f_max           | -1              | -1              | -1.0            | True 
son_offset      | 144             | 144             | 144.0           | True 
record_num      | 0               | 20784           | 10392.0         | True 
chunk_id        | 0               | 13              | 6.433           | True 


*******************************
****WARNING: INVALID VALUES****
*******************************
_______________________________
Sonar Channel   | Attribute      
_______________________________
B002            | prev_secondary_offset
B002            | prev_left_sidescan_offset
B002            | prev_right_sidescan_offset
B002            | min_range      
B002            | keel_depth_m   
B002            | water_speed    
B002            | heading_magnetic
B003            | prev_secondary_offset
B003            | prev_left_sidescan_offset
B003            | prev_right_sidescan_offset
B003            | min_range      
B003            | keel_depth_m   
B003            | water_speed    
B003            | heading_magnetic
B004            | prev_secondary_offset
B004            | prev_left_sidescan_offset
B004            | prev_right_sidescan_offset
B004            | min_range      
B004            | keel_depth_m   
B004            | water_speed    

*******************************
****WARNING: INVALID VALUES****
*******************************

PING-Mapper detected issues with
the values stored in the above
sonar channels and attributes.

Done!
Time (s): 2.4


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
7.3   | 29.2  | 19.9 
________________________




Filtering sonar log...

Done!
Time (s): 0.4


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
18.5  | 29.3  | 20.0 
________________________




Using instrument depth:

Done!
Time (s): 0.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
20.4  | 29.3  | 19.9 
________________________




Substrate mapping requires shadow removal
Setting remShadow==2...


Automatically detecting shadows for 15 chunks:
MODE: 2 | Remove shadows in far-field (river bankpick)...

Done!
Time (s): 28.7


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.7  | 68.7  | 46.8 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
9.8   | 68.6  | 46.7 
________________________



===========================================
===========================================
***** RECTIFYING *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk

Smoothing trackline...
Done!
Time (s): 0.2


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
14.7  | 68.5  | 46.7 
________________________



Calculating, smoothing, and interpolating range extent coordinates...
Done!
Time (s): 3.8


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
7.1   | 28.3  | 19.3 
________________________



Rectifying and exporting GeoTiffs:

Done!
Time (s): 0.0


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
7.1   | 28.3  | 19.3 
________________________



Mosaicing GeoTiffs...
Done!
Time (s): 0.0


Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
6.7   | 28.3  | 19.3 
________________________




Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
7.3   | 28.3  | 19.3 
________________________



===========================================
===========================================
***** MAPPING SUBSTRATE *****
working on C:\Users\cbodine\Desktop\RV-BB_testSmthTrk


Automatically predicting and segmenting substrate...

	Predicting substrate for 15 ss_port chunks


!!!!!!!!!!!!!!!!!
An Error Occured.

Please consult the logfile at:
 C:\Users\cbodine\Desktop\RV-BB_testSmthTrk\logs\error_2025-01-14_1218.txt

@CameronBodine
Copy link
Owner Author

Able to export substrate after 5bb0c4f. Testing on user's large dataset.

@CameronBodine
Copy link
Owner Author

I had an error similar to the first error:

File "C:\Users\cbodine\PythonRepos\PINGMapper\pingmapper\class_sonObj.py", line 2026, in _SHW_mask
    mask[v[0]:v[1], k] = 0
    ~~~~^^^^^^^^^^^^^^
IndexError: index 154 is out of bounds for axis 1 with size 154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0_Code for Zenhub Workspace Filtering bug Something isn't working end user issue - general bug Issues identified by end users end user issue - processing bug
Projects
None yet
Development

No branches or pull requests

1 participant