In PR #658 it was found that the beam group descriptions for EK80 can become more specific.
As it stands right now, we let the Beam_group1 description be "contains backscatter data (either complex samples or uncalibrated power samples) and other beam or channel-specific data".
To be more explicit, we can let the Beam_group1 description be:
- When only power data exists:
- "contains backscatter power (uncalibrated) and other beam or channel-specific data."
- When complex samples exist:
- "contains complex backscatter data and other beam or channel-specific data."
I have a rough idea of how we can accomplish this.
- Modify
beamgroups_possible (in EK80) to:
beamgroups_possible = [
{
"name": "Beam_group1",
"descr":
{
'power': "contains backscatter power (uncalibrated) and "
"other beam or channel-specific data.",
'complex': "contains complex backscatter data and other "
"beam or channel-specific data."
},
},
{
"name": "Beam_group2",
"descr": (
"contains backscatter power (uncalibrated) and other beam or channel-specific data," # noqa
" including split-beam angle data when they exist."
),
},
]
- Replace
https://github.com/OSOceanAcoustics/echopype/blob/e0b3cbff9459b57cc8320388cc1ac86da6063343/echopype/convert/api.py#L461-L470
with
beam_group_type = []
for idx, beam_group in enumerate(beam_groups, start=1):
if beam_group is not None:
beam_group_type.append("complex" if "backscatter_i" in beam_group else "power")
tree_dict[f"Sonar/Beam_group{idx}"] = beam_group
if sonar_model in ["EK80", "ES80", "EA640"]:
tree_dict["Sonar"] = setgrouper.set_sonar(beam_group_type=beam_group_type)
else:
tree_dict["Sonar"] = setgrouper.set_sonar()
- In set_sonar (for EK80) let
(https://github.com/OSOceanAcoustics/echopype/blob/e0b3cbff9459b57cc8320388cc1ac86da6063343/echopype/convert/set_groups_ek80.py#L174)
become
beam1_val = beamgroups_possible[0]
beam1_val['descr'] = beam1_val['descr']['complex']
self._beamgroups = [beam1_val] + beamgroups_possible[1:]
@emiliom what do you think?
In PR #658 it was found that the beam group descriptions for EK80 can become more specific.
As it stands right now, we let the
Beam_group1description be "contains backscatter data (either complex samples or uncalibrated power samples) and other beam or channel-specific data".To be more explicit, we can let the
Beam_group1description be:I have a rough idea of how we can accomplish this.
beamgroups_possible(in EK80) to:https://github.com/OSOceanAcoustics/echopype/blob/e0b3cbff9459b57cc8320388cc1ac86da6063343/echopype/convert/api.py#L461-L470
with
(https://github.com/OSOceanAcoustics/echopype/blob/e0b3cbff9459b57cc8320388cc1ac86da6063343/echopype/convert/set_groups_ek80.py#L174)
become
@emiliom what do you think?