dt=time[-1]-time[0] df=1.0*(dt**(-1)) avflux = numpy.mean(lc) dff = [] freq = [] pl, npoints = powcal( df, time, lc, avflux) for j in range(npoints): dff.append(pl[j]) freq.append(df*(j+1)) freq.append(freq[-1]) lfreq, blff, blperr = binps(npoints,freq,dff,minb,bfac) print len(blff) if first == 1: lcpl = zeros(len(blff)) first = 0 for data in range(len(lcpl)): lcpl[data] += blff[data] print "done", curve+1, "of", ncurves lcpl = lcpl / ncurves nfreq = numpy.array([]) powerlaw = []
dt= time[-1]-time[0] df= dt**(-1) avflux = numpy.mean(lc) dff = [] freq = [] pl, npoints = powcal( df, time, lc, avflux, bwidth) for j in range(npoints): dff.append(pl[j]) freq.append(df*(j+1)) freq.append(freq[-1]) lfreq, blff = binps(npoints,freq,dff) if first == 1: lcpl = zeros(len(blff)) first = 0 for data in range(len(lcpl)): lcpl[data] += blff[data] print "done", curve+1, "of", ncurves lcpl = lcpl / ncurves nfreq = numpy.array([]) powerlaw = []