Skip to content

Commit

Permalink
Merge pull request #16 from SpheMakh/master
Browse files Browse the repository at this point in the history
add casasm.py symlink to bin
  • Loading branch information
gijzelaerr committed Feb 17, 2015
2 parents 1e9172e + 10b752c commit 1f85ba3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Owlcat/bin/casasm.py
8 changes: 8 additions & 0 deletions Owlcat/simms/simms.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def toList(string,delimiter=',',f0=False):
if date is None:
date = '%d/%d/%d'%(time.localtime()[:3])

if msname is None:
msname = '%s/%s_%dh%s.MS'%(outdir,label or tel,synthesis,dtime)

casa_script = tempfile.NamedTemporaryFile(suffix='.py')
casa_script.write('# Auto Gen casapy script. From simms.py\n')
casa_script.write('execfile("%s/casasm.py")\n'%simms_path)
Expand All @@ -99,6 +102,11 @@ def toList(string,delimiter=',',f0=False):

tmpfile = casa_script.name
t0 = time.time()
# Log the simms command that invoked simms and add a time stamp
with open('log-simms.txt','a') as std:
ts = '%d/%d/%d %d:%d:%d'%(time.localtime()[:6])
ran = " ".join(map(str,sys.argv))
std.write('\n %s ::: %s\n'%(ts,ran))
process = subprocess.Popen(['casapy --nologger --log2term %s -c %s'%('--nologfile'\
if nolog else '--logfile log-simms.txt',repr(tmpfile))],
stderr=subprocess.PIPE if not isinstance(sys.stderr,file) else sys.stderr,
Expand Down

0 comments on commit 1f85ba3

Please sign in to comment.