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

Write 16 bits files in tofil

parent dd05aa21
......@@ -75,14 +75,14 @@ def create_filterbank(infile=None, outfile=None, date=None, source=None):
fil_header["src_dej"] = 0.0
fil_header["tstart"] = date
fil_header["tsamp"] = 0.00046811428571414528 # 1.0/35e6*256 chans*64 decimation
fil_header["nbits"] = 32
fil_header["nbits"] = 16
fil_header["fch1"] = 441.4
fil_header["foff"] = -35.0/256.0
fil_header["nchans"] = 256
fil_header["nifs"] = 1
# Write header
out = filterbank.create_filterbank_file(outfile, fil_header, nbits=32)
out = filterbank.create_filterbank_file(outfile, fil_header, nbits=16)
if not infile:
out.close()
......@@ -107,7 +107,7 @@ def create_filterbank(infile=None, outfile=None, date=None, source=None):
np.sum(data[1:,-1] - data[:-1,-1] - 1))
# Write data
out.append_spectra(data)
out.append_spectra(data.astype('u2'))
offset += 256*CHUNKSIZE*4
......
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