Skip to content

Failing to compute Sv for EK80 dataset with empty filter_time #1777

Description

@jarlela

ES80/EK80 raw files may not contain any Filter data when the echo sounder is operating in CW, Power/angle mode.

Example:

import echopype as ep
ed = ep.open_raw("filename.raw", sonar_model="EK80")
print(ed["Vendor_specific"]
<xarray.Dataset> Size: 27kB
Dimensions:                      (channel: 2, pulse_length_bin: 5,
                                  filter_time: 0, WBT_filter_n: 0,
                                  PC_filter_n: 0)
Coordinates:
  * channel                      (channel) <U30 240B 'GPT 00907208a0c9-1 ES38...
  * pulse_length_bin             (pulse_length_bin) int64 40B 0 1 2 3 4
  * filter_time                  (filter_time) float64 0B
Dimensions without coordinates: WBT_filter_n, PC_filter_n
Data variables: (12/14)
    frequency_nominal            (channel) float64 16B 3.8e+04 2e+05
    sa_correction                (channel, pulse_length_bin) float64 80B 0.0 ...
    gain_correction              (channel, pulse_length_bin) float64 80B 23.0...
    pulse_length                 (channel, pulse_length_bin) float64 80B 0.00...
    impedance_transceiver        (channel) int64 16B 1000 1000
    receiver_sampling_frequency  (channel) float64 16B 5e+05 5e+05
    ...                           ...
    WBT_coeffs_imag              (channel, filter_time, WBT_filter_n) float64 0B ...
    PC_coeffs_real               (channel, filter_time, PC_filter_n) float64 0B
    PC_coeffs_imag               (channel, filter_time, PC_filter_n) float64 0B
    WBT_deci_fac                 (channel, filter_time) float64 0B
    PC_deci_fac                  (channel, filter_time) float64 0B
    config_xml                   <U6607 26kB '<?xml version="1.0" encoding="u...

With this dataset, computation of Sv will fail as the algoritm in the _compute_cal function in echoype/calibrate/api.py will attempt to intersect on an empty set (around line 148).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions