Skip to content
Snippets Groups Projects
Commit 0066bbce authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Write predicted Fstat file to local directory rather than tmp

- Previously, the predict_fstat directed lalapps_PredictFstat to write
  the output to /tmp/fs. This caused failure when /tmp could not be
  written to so instead it writes it to a file in the working directory
  and then removes it
parent dbdd76b0
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,8 @@ def predict_fstat(h0, cosi, psi, Alpha, Delta, Freq, sftfilepattern,
The expectation and standard deviation of 2F
"""
tempory_filename = 'fs.tmp'
cl_pfs = []
cl_pfs.append("lalapps_PredictFstat")
cl_pfs.append("--h0={}".format(h0))
......@@ -170,11 +172,12 @@ def predict_fstat(h0, cosi, psi, Alpha, Delta, Freq, sftfilepattern,
cl_pfs.append("--minStartTime={}".format(int(minStartTime)))
cl_pfs.append("--maxStartTime={}".format(int(maxStartTime)))
cl_pfs.append("--outputFstat=/tmp/fs")
cl_pfs.append("--outputFstat={}".format(tempory_filename))
cl_pfs = " ".join(cl_pfs)
helper_functions.run_commandline(cl_pfs)
d = read_par(filename='/tmp/fs')
d = read_par(filename=tempory_filename)
os.remove(tempory_filename)
return float(d['twoF_expected']), float(d['twoF_sigma'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment