Skip to content

Commit

Permalink
corrected matching colnames rename bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tgalvin committed Jun 21, 2024
1 parent 0821c8f commit 263b261
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flint/ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,11 @@ def rename_ms_and_columns_for_selfcal(
logger.info(f"Removing {data} and renaming {corrected_data}")
tab.removecols(columnnames=data)
tab.renamecol(oldname=corrected_data, newname=data)
elif corrected_data in colnames and data not in controlnames:
elif (
corrected_data in colnames
and data not in controlnames
and corrected_data != data
):
logger.info(f"Renaming {corrected_data=} to {data=}")
tab.renamecol(oldname=corrected_data, newname=data)
elif corrected_data not in colnames and data in colnames:
Expand Down

0 comments on commit 263b261

Please sign in to comment.