Skip to content

Commit

Permalink
add TODO for sections to fix #734
Browse files Browse the repository at this point in the history
  • Loading branch information
leewujung committed Jun 21, 2022
1 parent b81ffef commit 0262462
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions echopype/convert/set_groups_ad2cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class SetGroupsAd2cp(SetGroupsBase):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# TODO: bug: 0 if not exist in first string packet
# resulting in index error in setting ds["pulse_compressed"]
self.pulse_compressed = self.parser_obj.get_pulse_compressed()
self._make_time_coords()
with resources.open_text(convert, "ad2cp_fields.yaml") as f:
Expand Down Expand Up @@ -358,6 +360,7 @@ def set_beam(self) -> List[xr.Dataset]:
)
ds = ds.assign_coords({"echogram": np.arange(3)})
pulse_compressed = np.zeros(3)
# TODO: bug: if self.pulse_compress=0 this will set the last index to 1
pulse_compressed[self.pulse_compressed - 1] = 1
ds["pulse_compressed"] = (("echogram",), pulse_compressed)
beam_groups.append(ds)
Expand Down

0 comments on commit 0262462

Please sign in to comment.