Skip to content

Create more specific beam group descriptions for EK80 #671

@b-reyes

Description

@b-reyes

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.

  1. 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."
            ),
        },
    ]
  1. 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()
  1. 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?

Metadata

Metadata

Assignees

Labels

enhancementThis makes echopype better

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions