Skip to content

Commit

Permalink
bug fixes in uubatchpbs.py and uurundaily.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Morrison committed Apr 6, 2023
1 parent 1301f1a commit ab8845f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bin/uubatchpbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions bin/uurundaily.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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('')
Expand Down

0 comments on commit ab8845f

Please sign in to comment.