Skip to content

Commit

Permalink
making from_sandbox also long-term by default & fixing get_calib_path…
Browse files Browse the repository at this point in the history
…s for cals reductions
  • Loading branch information
ajmejia committed Oct 22, 2024
1 parent 59cc304 commit 0c01cb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/lvmdrp/utils/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,18 @@ def get_calib_paths(mjd, version=None, cameras="*", flavors=CALIBRATION_NAMES, l
if version is None and not from_sanbox:
raise ValueError(f"You must provide a version string to get calibration paths, {version = } given")

# make long-term if taking calibrations from sandbox (nightly calibrations are not stored in sandbox)
if from_sanbox:
longterm_cals = True

cams = fnmatch.filter(CAMERAS, cameras)
channels = "".join(sorted(set(map(lambda c: c.strip("123"), cams))))

tileid = 11111
tilegrp = tileid_grp(tileid)

cals_mjd = get_master_mjd(mjd) if longterm_cals or from_sanbox else mjd
# get long-term MJDs from sandbox using get_master_mjd, else use given MJD
cals_mjd = get_master_mjd(mjd) if from_sanbox else mjd

# define root path to pixel flats and masks
# TODO: remove this once sdss-tree are updated with the corresponding species
Expand Down

0 comments on commit 0c01cb7

Please sign in to comment.