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
|
valid_beam_groups_count = 0 |
|
for idx, beam_group in enumerate(beam_groups, start=1): |
|
if beam_group is not None: |
|
valid_beam_groups_count += 1 |
|
tree_dict[f"Sonar/Beam_group{idx}"] = beam_group |
|
|
|
if sonar_model in ["EK80", "ES80", "EA640"]: |
|
tree_dict["Sonar"] = setgrouper.set_sonar(beam_group_count=valid_beam_groups_count) |
|
else: |
|
tree_dict["Sonar"] = setgrouper.set_sonar() |
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
(
|
self._beamgroups = self.beamgroups_possible[:beam_group_count] |
)
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:echopype/echopype/convert/api.py
Lines 461 to 470 in e0b3cbf
with
(
echopype/echopype/convert/set_groups_ek80.py
Line 174 in e0b3cbf
become
@emiliom what do you think?