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

Remove ui_param #1071

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
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
7 changes: 0 additions & 7 deletions echopype/convert/set_groups_ad2cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,6 @@ def set_platform(self) -> xr.Dataset:
"roll": "roll",
}
)
ds = ds.assign_attrs(
{
"platform_name": self.ui_param["platform_name"], # type: ignore
"platform_type": self.ui_param["platform_type"], # type: ignore
"platform_code_ICES": self.ui_param["platform_code_ICES"], # type: ignore
}
)
return set_time_encodings(ds)

def set_beam(self) -> List[xr.Dataset]:
Expand Down
2 changes: 0 additions & 2 deletions echopype/convert/set_groups_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def __init__(
self.engine = engine
self.compress = compress
self.overwrite = overwrite
self.ui_param = params

# parsed data written directly to zarr object
self.parsed2zarr_obj = parsed2zarr_obj
Expand Down Expand Up @@ -71,7 +70,6 @@ def set_toplevel(self, sonar_model, date_created=None) -> xr.Dataset:
"summary": "",
"title": "",
"date_created": np.datetime_as_string(date_created, "s") + "Z",
"survey_name": self.ui_param["survey_name"],
}
# Save
ds = xr.Dataset()
Expand Down
4 changes: 1 addition & 3 deletions echopype/convert/set_groups_ek80.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,7 @@ def set_platform(self) -> xr.Dataset:
)

# Collect variables
if self.ui_param["water_level"] is not None:
water_level = self.ui_param["water_level"]
elif "water_level_draft" in self.parser_obj.environment:
if "water_level_draft" in self.parser_obj.environment:
water_level = self.parser_obj.environment["water_level_draft"]
else:
water_level = np.nan
Expand Down