Skip to content
Snippets Groups Projects
Commit 243d2f64 authored by Vlad Kondratiev's avatar Vlad Kondratiev
Browse files

added writing requantisation command to the ldv_psrfits_requantisation.log

parent 585bd3ea
Branches
Tags
1 merge request!7Add requantize workflow
Pipeline #49584 passed
...@@ -165,9 +165,14 @@ def main(): ...@@ -165,9 +165,14 @@ def main():
# removing the converted file if it's still there (for instance after the crash, etc). # removing the converted file if it's still there (for instance after the crash, etc).
# otherwise psrfits_subband will not work - can't override the file if it exists already # otherwise psrfits_subband will not work - can't override the file if it exists already
os.system("rm -f %s.fits" % (outputbase)) os.system("rm -f %s.fits" % (outputbase))
outf = open(logfile, 'w')
outf.write("=" * 75 + "\n")
outf.write("Input PSRFITS file: %s\n" % (ii))
outf.write("Command: %s\n" % (cmd))
outf.close()
proc = Popen(shlex.split(cmd), stdout=PIPE, stderr=STDOUT, cwd="%s/%s" % (workdir, rootdir), shell=False) proc = Popen(shlex.split(cmd), stdout=PIPE, stderr=STDOUT, cwd="%s/%s" % (workdir, rootdir), shell=False)
(sout, serr) = proc.communicate() (sout, serr) = proc.communicate()
outf = open(logfile, 'w') outf = open(logfile, 'a')
outf.write(sout.decode("utf-8").replace("\r\n", "\n")) outf.write(sout.decode("utf-8").replace("\r\n", "\n"))
outf.close() outf.close()
for line in sout.decode("utf-8").split("\n"): for line in sout.decode("utf-8").split("\n"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment