Skip to content

Commit

Permalink
Merge pull request #88 from Subaru-PFS/tickets/OBSPROC-94-hotfix
Browse files Browse the repository at this point in the history
rename 'reference_arm' to 'qa_reference_arm'
  • Loading branch information
monodera authored Jun 8, 2024
2 parents 40ed143 + c6d03ea commit 4d88c4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/targetdb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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:
Expand Down

0 comments on commit 4d88c4b

Please sign in to comment.