Commit 1703d50b authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

Hard code path, move time to last moment

parent 27dc2ae2
......@@ -35,25 +35,25 @@ def create_filterbank(outfile, source, infile=None, date=None, headeronly=False,
source = "PSR " + source
if not date:
if infile:
date = Time(os.path.getctime(infile), format='unix')
else:
date = Time.now()
else:
date = Time(date, format='isot')
az_start = 0.
za_start = 0.
src_raj = 0.
src_dej = 0.
if telescope_found:
dt = telescope()
az_start = (180*u.deg + dt.getAzEl(waitForUpdate=True)[0]).to(u.deg).value
dt = telescope(consoleHost='console')
az_start = (180*u.deg + dt.getAzEl(waitForUpdate=True)[0]).to(u.deg).value % 360
za_start = (90*u.deg - dt.getAzEl()[1]).to(u.deg).value
src_raj = dt.getRaDec().ra.to_string(unit=u.hour, sep='')
src_dej = dt.getRaDec().dec.to_string(unit=u.degree, sep='')
if not date:
if infile:
date = Time(os.path.getctime(infile), format='unix')
else:
date = Time.now()
else:
date = Time(date, format='isot')
print("Input file: {}".format(infile))
print("Output file: {}".format(outfile))
print("Source name: {}".format(source))
......@@ -97,7 +97,7 @@ def create_filterbank(outfile, source, infile=None, date=None, headeronly=False,
if not infile:
out.close()
cmd = "./pulsar_filterbank " + str(time) + " " + outfile
cmd = "~dijkema/pulsar/pulsar_filterbank " + str(time) + " " + outfile
print("Running "+cmd)
os.system(cmd)
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment