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

Retain ROWID coordinates during MS conversion #286

Merged
merged 2 commits into from
Sep 14, 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 daskms/apps/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@ def convert_table(self, args):

datasets = reader(args.input, chunks=args.chunks)

if isinstance(in_fmt, CasaFormat):
# Drop any ROWID columns
datasets = [ds.drop_vars("ROWID", errors="ignore") for ds in datasets]

if exclude_columns := args.exclude.get("MAIN", False):
datasets = [
ds.drop_vars(exclude_columns, errors="ignore") for ds in datasets
Expand Down Expand Up @@ -273,9 +269,6 @@ def convert_table(self, args):
ds.drop_vars(exclude_columns, errors="ignore") for ds in datasets
]

if isinstance(in_fmt, CasaFormat):
datasets = [ds.drop_vars("ROWID", errors="ignore") for ds in datasets]

writes.append(writer(datasets, out_store))

return writes
1 change: 1 addition & 0 deletions daskms/apps/tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_convert_application(tau_ms, format, tmp_path_factory):
for ds in datasets:
assert "MODEL_DATA" not in ds.data_vars
assert "FLAG" in ds.data_vars
assert "ROWID" in ds.coords

datasets = xds_from_storage_table(f"{str(OUTPUT)}::POINTING")

Expand Down