You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from 0.8.4 to 0.9.0, by EA640 raw data files fails to compute Sv.
The bug is caused by an oversight in _check_echodata_backscatter_size, where total_nbytes remains unset for all sonar models except for EK60, EK80 and AZFP.
Traceback (most recent call last):
File "/Users/tnh/Documents/workspace/PGS_playground/demos/demo_pgs.py", line 14, in<module>
echo_data_sv = ep.calibrate.compute_Sv(echo_data, waveform_mode="CW", encode_mode="power")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tnh/.virtualenvs/echo-test/lib/python3.11/site-packages/echopype/calibrate/api.py", line 208, in compute_Sv
return _compute_cal(cal_type="Sv", echodata=echodata, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tnh/.virtualenvs/echo-test/lib/python3.11/site-packages/echopype/calibrate/api.py", line 62, in _compute_cal
cal_obj._check_echodata_backscatter_size()
File "/Users/tnh/.virtualenvs/echo-test/lib/python3.11/site-packages/echopype/calibrate/calibrate_base.py", line 117, in _check_echodata_backscatter_size
total_gb = total_nbytes / (1024**3)
^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'total_nbytes' where it is not associated with a value
Exception ignored in: <function EchoData.__del__ at 0x168f640e0>
Traceback (most recent call last):
File "/Users/tnh/.virtualenvs/echo-test/lib/python3.11/site-packages/echopype/echodata/echodata.py", line 105, in __del__
File "/Users/tnh/.virtualenvs/echo-test/lib/python3.11/site-packages/echopype/echodata/echodata.py", line 81, in cleanup_swap_files
File "/Users/tnh/.virtualenvs/echo-test/lib/python3.11/site-packages/xarray/core/dataset.py", line 1539, in __getitem__
ModuleNotFoundError: import of xarray.core.formatting halted; None in sys.modules
Process finished with exit code 1
Example data
Data is unfortunately not open to share.
Related existing issues or PRs
I have not seen, pull request will arrive later today.
Troubleshooting steps
No response
The text was updated successfully, but these errors were encountered:
General description of problem
After upgrading from 0.8.4 to 0.9.0, by EA640 raw data files fails to compute Sv.
The bug is caused by an oversight in _check_echodata_backscatter_size, where total_nbytes remains unset for all sonar models except for EK60, EK80 and AZFP.
Echopype version
0.9.0
How did you install Echopype (e.g., conda or pip)
pip
What is your operating system
macOS 14.6.1
Minimal code example
import echopype as ep
echo_data = ep.open_raw(raw_file=path, sonar_model="EA640")
echo_data_sv = ep.calibrate.compute_Sv(echo_data, waveform_mode="CW", encode_mode="power")
Error message printouts
Example data
Data is unfortunately not open to share.
Related existing issues or PRs
I have not seen, pull request will arrive later today.
Troubleshooting steps
No response
The text was updated successfully, but these errors were encountered: