pyEcholab is an open-source, Python-based toolkit for reading, processing, plotting and exporting fisheries acoustic echosounder data. The goal for this project is to become a community resource the grows through community involvement and contribution.
Other
37
stars
23
forks
source link
'Frequency' assignment assumes center frequency #61
For FM channels, frequency is assigned as the center frequency, which is likely not the typical case given the ranges used for common transducers. There are two spots where I think this is assigned:
line 3361 in EK80.py
# Adjust sensitivities for FM
if cal_parms['frequency'] is None:
fc = (cal_parms['frequency_start'] + cal_parms['frequency_end']) / 2
fc /= cal_parms['transducer_frequency']
and again at line 3674:
if self.is_fm(all=True):
# All of the pings are FM
frequency = (self.frequency_start + self.frequency_end) / 2.0
This seems to be carried over into the power_data.frequency used in Sv calculations (line 4052) and not corrected when applying an ecs file. First as expected when loading a file with a single 70 kHz FM channel:
If I just calculate the power using the default parameters:
If I read in an ecs file, frequency returns nothing, though the transducer frequency is now set:
I'm happy to help pick through this, but I'm not sure the best approach. One simple alternative would be to use the transducer_frequency from the configuration and otherwise allow someone to reassign the nominal frequency for Sv calculations.
For FM channels, frequency is assigned as the center frequency, which is likely not the typical case given the ranges used for common transducers. There are two spots where I think this is assigned:
line 3361 in EK80.py
and again at line 3674:
This seems to be carried over into the
power_data.frequency
used in Sv calculations (line 4052) and not corrected when applying an ecs file. First as expected when loading a file with a single 70 kHz FM channel:If I just calculate the power using the default parameters:
If I read in an ecs file, frequency returns nothing, though the transducer frequency is now set:
I'm happy to help pick through this, but I'm not sure the best approach. One simple alternative would be to use the
transducer_frequency
from the configuration and otherwise allow someone to reassign the nominal frequency for Sv calculations.