From c6d03eac4c11aa981483e2fc84f167d8b80b30c7 Mon Sep 17 00:00:00 2001 From: Masato Onodera Date: Fri, 7 Jun 2024 14:52:49 -1000 Subject: [PATCH] rename 'reference_arm' to 'qa_reference_arm' --- src/targetdb/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/targetdb/utils.py b/src/targetdb/utils.py index 0cbb794..ea5adc5 100644 --- a/src/targetdb/utils.py +++ b/src/targetdb/utils.py @@ -584,7 +584,8 @@ def make_target_df_from_uploader( Notes ----- - This function renames the 'exptime' column to 'effective_exptime' if it exists in the DataFrame. + This function renames the 'exptime' column to 'effective_exptime' and + 'reference_arm' to 'qa_reference_arm' if they exist in the DataFrame. """ logger.info(f"The default target_type_name {target_type_name} is used.") @@ -604,6 +605,9 @@ def make_target_df_from_uploader( if "exptime" in df.columns: df.rename(columns={"exptime": "effective_exptime"}, inplace=True) + if "reference_arm" in df.columns: + df.rename(columns={"reference_arm": "qa_reference_arm"}, inplace=True) + # fill missing values with None or NaN for filters and fluxes for band in ["g", "r", "i", "z", "y", "j"]: if f"filter_{band}" in df.columns: