infile = [] file_data = [] file_startMJDi = [] file_startMJDf = [] file_endMJDi = [] file_endMJDf = [] file_N = [] padbins = [] print 'The input files are:' for index in range(len(argv)-4): infile.append(argv[index+4]) infile[index] = infile[index][0:rfind(infile[index],'.')] # Get the info about the data file file_data.append(infodata(infile[index]+".inf")) file_data[index].mjd_i = int(file_data[index].epoch) file_data[index].mjd_f = file_data[index].epoch - file_data[index].mjd_i file_N.append(long(file_data[index].N + 1.0e-10)) file_startMJDi.append(file_data[index].mjd_i) file_startMJDf.append(file_data[index].mjd_f) # Calculate the ending MJDs of each segment (MJDi, MJDf) = addtoMJD((file_data[index].dt * file_N[index]) \ / SECPERDAY, file_startMJDi[index], \ file_startMJDf[index]) file_endMJDi.append(MJDi) file_endMJDf.append(MJDf) print ' %s.dat: %9.0f pts at MJD %5d.%015.0f' % \ (infile[index], file_N[index], \
3: 1.0 / 12, 4: 1.0 / 12, 5: 1.0 / 60, 6: 1.0 / 60 } # The following are for the lowest harmonic zmax = 20 dr = drs[numharm] dz = dr * 4.0 numrs = int(round(4 * zmax / dr)) numzs = int(round(2 * zmax / dz)) + 1 infilenm = sys.argv[1] infile = open(infilenm, 'rb') idata = infodata(infilenm[:-4] + ".inf") idata.T = idata.N * idata.dt ctrr = int(round(float(sys.argv[2]) * idata.T)) startr = int(ctrr - numrs / 2 * dr) ctrfreq = ctrr / idata.T ffdps = [] maxvals = [] maxargs = [] for harmnum in range(1, numharm + 1): print "Computing harmonic", harmnum ldr = dr * harmnum ldz = dz * harmnum lor = startr * harmnum
sys.exit(0) # Each of the harmonics must have an even number of bins interpolated # (i.e. integer number of interpolated pointed between the integer bins) drs = {1: 1.0/4, 2: 1.0/8, 3: 1.0/12, 4: 1.0/12, 5: 1.0/60, 6: 1.0/60} # The following are for the lowest harmonic zmax = 20 dr = drs[numharm] dz = dr * 4.0 numrs = int(round(4*zmax/dr)) numzs = int(round(2*zmax/dz)) + 1 infilenm = sys.argv[1] infile = open(infilenm, 'rb') idata = infodata(infilenm[:-4]+".inf") idata.T = idata.N * idata.dt ctrr = int(round(float(sys.argv[2]) * idata.T)) startr = int(ctrr - numrs/2 * dr) ctrfreq = ctrr / idata.T ffdps = [] maxvals = [] maxargs = [] for harmnum in range(1, numharm+1): print "Computing harmonic", harmnum ldr = dr * harmnum ldz = dz * harmnum lor = startr * harmnum
infile = [] file_data = [] file_startMJDi = [] file_startMJDf = [] file_endMJDi = [] file_endMJDf = [] file_N = [] padbins = [] print 'The input files are:' for index in range(len(argv) - 4): infile.append(argv[index + 4]) infile[index] = infile[index][0:rfind(infile[index], '.')] # Get the info about the data file file_data.append(infodata(infile[index] + ".inf")) file_data[index].mjd_i = int(file_data[index].epoch) file_data[index].mjd_f = file_data[index].epoch - file_data[index].mjd_i file_N.append(long(file_data[index].N + 1.0e-10)) file_startMJDi.append(file_data[index].mjd_i) file_startMJDf.append(file_data[index].mjd_f) # Calculate the ending MJDs of each segment (MJDi, MJDf) = addtoMJD((file_data[index].dt * file_N[index]) \ / SECPERDAY, file_startMJDi[index], \ file_startMJDf[index]) file_endMJDi.append(MJDi) file_endMJDf.append(MJDf) print ' %s.dat: %9.0f pts at MJD %5d.%015.0f' % \ (infile[index], file_N[index], \