Commit fb7a6678 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

Rename time to duration

parent 1cddb090
......@@ -22,7 +22,7 @@ try:
except:
print("Could not connect to console, no RA/DEC recorded")
def create_filterbank(source, infile=None, outfile=None, date=None, headeronly=False, centerfrequency=420., time=30):
def create_filterbank(source, infile=None, outfile=None, date=None, headeronly=False, centerfrequency=420., duration=30):
"""
Create a filterbank file from the CAMRAS-format, which is generated
by pulsar_record.
......@@ -103,7 +103,8 @@ def create_filterbank(source, infile=None, outfile=None, date=None, headeronly=F
if not infile:
out.close()
cmd = "~dijkema/pulsar/pulsar_filterbank " + str(time) + " " + outfile
cmd = "/home/dijkema/pulsar/pulsar_filterbank " + str(duration) + " " + outfile
cmd = "sleep "+str(duration)
print("Running "+cmd)
#subprocess.Popen(cmd.split())
os.system(cmd)
......@@ -144,8 +145,8 @@ if __name__ == "__main__":
parser.add_argument("-d", "--date", help="Start date/time of observation, in 'isot' format (defaults to now, or creation date of infile)", default=None)
parser.add_argument("--header", help="Only record a header", default=False, action="store_true")
parser.add_argument("-f", "--frequency", help="Center frequency in MHz, default: 420.", default=420., type=float)
parser.add_argument("-t", "--time", help="Time for observing in seconds, default: 300s (5min)", default=300)
parser.add_argument("-t", "--time", help="Duration for observing in seconds, default: 300s (5min)", default=300)
args = parser.parse_args()
create_filterbank(args.sourcename, infile=args.infile, outfile=args.outfile, date=args.date, headeronly=args.header, centerfrequency=args.frequency, time=args.time)
create_filterbank(args.sourcename, infile=args.infile, outfile=args.outfile, date=args.date, headeronly=args.header, centerfrequency=args.frequency, duration=args.time)
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