CameronBodine / PINGMapper

Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
https://cameronbodine.github.io/PINGMapper/
MIT License
39 stars 3 forks source link

Unable to process Humminbird Apex recording. #117

Closed CameronBodine closed 3 months ago

CameronBodine commented 3 months ago

Provide Log Files

Console output:

 ***User Parameters***
| project_mode         : 1          |
| tempC                : 10.0       |
| nchunk               : 500        |
| cropRange            : 0.0        |
| exportUnknown        : True       |
| fixNoDat             : False      |
| threadCnt            : 0          |
| pix_res_son          : 0.025      |
| 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               : 0.0        |
| maxCrop              : False      |
| remShadow            : 0          |
| detectDep            : 0          |
| smthDep              : False      |
| adjDep               : 0.0        |
| pltBedPick           : True       |
| rect_wcp             : True       |
| rect_wcr             : False      |
| 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      |
sonPath Z:/UDEL/Hydronalix_SEARCHER/sonar_data/20240531_apex/Data/Spotter Buoy, North Lander leftovers\Rec00001

+++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++
***** Working On *****
Z:/UDEL/Hydronalix_SEARCHER/sonar_data/20240531_apex/Data/Spotter Buoy, North Lander leftovers\Rec00001.DAT
Start Time:  2024-06-05 11:28

===========================================
===========================================
***** READING *****

Current CPU/RAM Usage:
________________________
CPU % | RAM % | RAM [GB]
________________________
11.7  | 19.4  | 26.7 
________________________

Getting DAT Metadata...
Z:/UDEL/Hydronalix_SEARCHER/sonar_data/20240531_apex/Data/Spotter Buoy, North Lander leftovers\Rec00001.DAT

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

Please consult the logfile at:
 Z:/UDEL/Hydronalix_SEARCHER/proc_data_test_20240605\Rec00001\logs\error_2024-06-05_1128.txt

Could not process: Z:/UDEL/Hydronalix_SEARCHER/sonar_data/20240531_apex/Data/Spotter Buoy, North Lander leftovers\Rec00001.DAT

Error Log:

Error Thrown:
Traceback (most recent call last):
  File "E:\Python\PINGMapper\gui_main_batchDirectory.py", line 316, in <module>
    read_master_func(**params)
  File "E:\Python\PINGMapper\src\main_readFiles.py", line 288, in read_master_func
    son._getHumdat()
  File "E:\Python\PINGMapper\src\class_sonObj.py", line 405, in _getHumdat
    c = 1449.05 + 45.7*t - 5.21*t**2 + 0.23*t**3 + (1.333 - 0.126*t + 0.009*t**2)*(S - 35)
                                                                                   ^
UnboundLocalError: cannot access local variable 'S' where it is not associated with a value

Additional Information

The Apex DAT file length is 100 bytes while another recording from a Solix is 96 bytes. File structure appears to have changed with newer Humminbird model or firmware version.

CameronBodine commented 3 months ago

The increase in the DAT file from 96 to 100 pushed the _getHumdat() function into an elif when selecting the water type selected during the survey. I am assuming the water type code has not changed from previously known values for the Solix. Confirming the assumption is correct with the end user. But the issue is fixed and able to decode the DAT and SON files.