From 1cee008d1b1ec9a12a0f2571d8062216b0658396 Mon Sep 17 00:00:00 2001 From: Justin Ely Date: Sun, 5 Jun 2016 13:17:43 -0400 Subject: [PATCH] fix path issue for ref file in bd_calstis --- refstis/functions.py | 9 ++++++--- refstis/pipeline.py | 5 +---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/refstis/functions.py b/refstis/functions.py index 78e5572..201e2bf 100644 --- a/refstis/functions.py +++ b/refstis/functions.py @@ -997,10 +997,9 @@ def bias_subtract_data(filename, biasfile): name, ext = os.path.splitext(name) trailerfile = os.path.join(path, name + '_bias_subtract_log.txt') - #biasfile = make_path_safe(biasfile) - biasfile = os.path.relpath(biasfile) + biasfile = make_path_safe(biasfile) - pyfits.setval(filename, 'BIASFILE', value=biasfile) + pyfits.setval(filename, 'BIASFILE', ext=0, value=biasfile) status = basic2d(filename, dqicorr='perform', blevcorr='perform', @@ -1034,8 +1033,12 @@ def make_path_safe(filename): return filename path, filename = os.path.split(filename) + #-- Calstis wants the '/' at the end + if not path.endswith('/'): + path += '/' os.environ['refdir'] = path + filename = 'refdir$'+filename return filename diff --git a/refstis/pipeline.py b/refstis/pipeline.py index e892681..886c92d 100755 --- a/refstis/pipeline.py +++ b/refstis/pipeline.py @@ -877,10 +877,7 @@ def run(config_file='config.yaml'): raise KeyError("oref environment must be set to run the pipeline.") else: os.environ['oref'] = data['oref'] - - # -- used when files are too long for calstis to process - os.environ[data['tmp_env']] = data['tmp_path'] - + pop_db.main() all_folders = get_new_periods(data['products_directory'], data)