Skip to content

Commit

Permalink
Integer division issue
Browse files Browse the repository at this point in the history
  • Loading branch information
scottransom committed Nov 19, 2019
1 parent 0c4d648 commit 3f8ad1e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions examplescripts/short_analysis_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def main():
help="High frequency (Hz) to search")
parser.add_option("-z", "--zmax", type="int", dest="zmax", default=160,
help="Maximum fourier drift (bins) to search")
parser.add_option("-w", "--wmax", type="int", dest="wmax", default=400,
parser.add_option("-w", "--wmax", type="int", dest="wmax", default=0,
help="Maximum fourier drift deriv (bins) to search")
parser.add_option("-a", "--numharm", type="int", dest="numharm", default=4,
help="Number of harmonics to sum when searching")
Expand All @@ -47,7 +47,7 @@ def main():
exit(1)
else:
options.nM *= 1000000
short_nM = options.nM / 1000000
short_nM = options.nM // 1000000

# The basename of the data files
if argv[1].endswith(".dat"):
Expand All @@ -73,9 +73,9 @@ def main():
print("Baryv = ", baryv)
inf.N = options.nM
inf.numonoff = 0
nM = options.nM / 1000000
nM = options.nM // 1000000
while point + options.nM < N:
pM = point / 1000000
pM = point // 1000000
outname = basename[3:]+'_%03dM'%nM+'_%02d'%num
stdout.write('\n'+outname+'\n\n')
inf.name = outname
Expand All @@ -95,9 +95,14 @@ def main():
myexecute('zapbirds -zap -zapfile '+outname+'.zaplist -baryv %g '%
baryv+outname+'.fft')
myexecute('rm -f '+outname+'.zaplist')
myexecute('accelsearch -sigma %.2f -zmax %d -wmax %d -numharm %d -flo %f -fhi %f '%
(options.sigma, options.zmax, options.wmax,
options.numharm, options.flo, options.fhi)+outname+'.fft')
if options.wmax > 0:
myexecute('accelsearch -sigma %.2f -zmax %d -wmax %d -numharm %d -flo %f -fhi %f '%
(options.sigma, options.zmax, options.wmax,
options.numharm, options.flo, options.fhi)+outname+'.fft')
else:
myexecute('accelsearch -sigma %.2f -zmax %d -numharm %d -flo %f -fhi %f '%
(options.sigma, options.zmax,
options.numharm, options.flo, options.fhi)+outname+'.fft')
myexecute('rm '+outname+'.fft '+outname+'_ACCEL_%d.txtcand'%options.zmax)
myexecute('cp '+outname+'.inf '+options.outdir)
num = num + 1
Expand Down

0 comments on commit 3f8ad1e

Please sign in to comment.