From ab8845f9466a9b21474c07ae87d1f5c3fcc3d3e9 Mon Sep 17 00:00:00 2001 From: Sean-Morrison Date: Thu, 6 Apr 2023 15:32:17 -0500 Subject: [PATCH] bug fixes in uubatchpbs.py and uurundaily.py --- bin/uubatchpbs.py | 4 +++- bin/uurundaily.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/uubatchpbs.py b/bin/uubatchpbs.py index 8a1400a2..a09f55bb 100755 --- a/bin/uubatchpbs.py +++ b/bin/uubatchpbs.py @@ -378,6 +378,8 @@ def uubatchpbs(obs = ['apo', 'lco'], topdir = getenv('BOSS_SPECTRO_REDUX'), if email is True: if daily: jdate = mjd[0] + else: + jdate = int(float(astropy.time.Time(datetime.datetime.utcnow()).jd)-2400000.5) elog.send('UUBATCH '+run2d +' MJD='+str(jdate) +' OBS='+','.join(obs), ptt.join(getenv('HOME'), 'daily', 'etc','emails'), logger) logger.removeHandler(emaillog) emaillog.close() @@ -458,7 +460,7 @@ def make_run_cmd(redux): args = parser.parse_args() if args.sdssv is True or args.sdssv_fast is True: - args.saveraw = True + args.saveraw = False args.MWM_fluxer = True args.no_reject = True args.no_merge_spall = True diff --git a/bin/uurundaily.py b/bin/uurundaily.py index 9eb135cb..11c57142 100755 --- a/bin/uurundaily.py +++ b/bin/uurundaily.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 import argparse -from os import getenv, makedirs, popen, chdir, getcwd, popen +from os import getenv, makedirs, popen, chdir, getcwd import os.path as ptt from uubatchpbs import uubatchpbs, Formatter from load_module import load_module @@ -132,7 +132,9 @@ def build_run(skip_plan, logdir, obs, mj, run2d, run1d, idlspec2d_dir, options, printAndRun(logger, "idl -e 'spplan1d"+flags1d+", MJD="+str(mjd)+"'",idlspec2d_dir) else: logger.info('Using old spplan files') - logger.info('Running uubatchpbs.py --run2d '+run2d+' --obs '+obs[0]+' --sdssv_fast --email'+ + fast_msg = '_fast' if options['fast'] else '' + + logger.info('Running uubatchpbs.py --run2d '+run2d+' --obs '+obs[0]+' --sdssv'+fast_msg+' --email'+ ' --topdir '+topdir+ ' --run1d '+run1d+ ' --mjd '+' '.join(np.asarray(mj).astype(str).tolist())) logger.info('')