From 22a40384d7df8d61ac0b3477ce5db1dab8eb53ac Mon Sep 17 00:00:00 2001 From: Sean-Morrison Date: Fri, 18 Oct 2024 01:18:21 -0500 Subject: [PATCH] Add SDSSC2VB env var to version control flags --- python/sdss_semaphore/targeting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sdss_semaphore/targeting.py b/python/sdss_semaphore/targeting.py index f97b098..9a3f3ce 100644 --- a/python/sdss_semaphore/targeting.py +++ b/python/sdss_semaphore/targeting.py @@ -1,6 +1,6 @@ import numpy as np from typing import Tuple - +from os import getenv from sdss_semaphore import BaseFlags, cached_class_property class BaseTargetingFlags(BaseFlags): @@ -137,7 +137,7 @@ class TargetingFlags(BaseTargetingFlags): """Communicating with SDSS-V targeting flags.""" dtype, n_bits = (np.uint8, 8) - MAPPING_BASENAME = "sdss5_target_2_with_groups.csv" + MAPPING_BASENAME = f"sdss5_target_{getenv('SDSSC2VB', default=2)}_with_groups.csv" # TODO: Metadata about mapping version should be stored in the MAPPING_BASENAME file # and be assigned as a cached class property once the file is loaded.