Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AZFP: add missing mandatory Beam_group1 variables #1102

Merged
merged 4 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions echopype/convert/set_groups_azfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,32 @@ def set_beam(self) -> List[xr.Dataset]:
"standard_name": "sound_frequency",
},
),
"beam_type": (
["channel"],
[0] * len(self.channel_ids_sorted),
{
"long_name": "Beam type",
"flag_values": [0, 1],
"flag_meanings": [
"Single beam",
"Split aperture beam",
],
},
),
**{
f"beam_direction_{var}": (
["channel"],
[np.nan] * len(self.channel_ids_sorted),
{
"long_name": f"{var}-component of the vector that gives the pointing "
"direction of the beam, in sonar beam coordinate "
"system",
"units": "1",
"valid_range": (-1.0, 1.0),
},
)
for var in ["x", "y", "z"]
},
"backscatter_r": (
["channel", "ping_time", "range_sample"],
np.array(N, dtype=np.float32),
Expand Down Expand Up @@ -382,6 +408,17 @@ def set_beam(self) -> List[xr.Dataset]:
"valid_min": 0.0,
},
),
"transmit_type": (
[],
"CW",
{
"long_name": "Type of transmitted pulse",
"flag_values": ["CW"],
"flag_meanings": [
"Continuous Wave",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been mulling over about this. It is true that CW is Continuous Wave, but it is an approximation. The actual transmit signal is gated sine wave. I wonder if this would be misleading. This is something defined in the convention, but do you think we can add something to make it "Continuous Wave (gated sine wave)"?

],
},
),
"beam_stabilisation": (
[],
np.array(0, np.byte),
Expand Down