Commit be8b4f94 authored by Remi Mommsen's avatar Remi Mommsen Committed by Dainius Simelevicius
Browse files

references #180: accept 3rd-degree polynomials

parent d1743b33
...@@ -16,13 +16,14 @@ with open(args['outputFile'],'w') as outputFile: ...@@ -16,13 +16,14 @@ with open(args['outputFile'],'w') as outputFile:
for line in paramFile: for line in paramFile:
try: try:
(fedIds,a,b,c,rms) = line.split(',',5) (fedIds,a,b,c,rms) = line.split(',',5)
except ValueError: except ValueError:
(fedIds,a,b,c,rms,_) = line.split(',',6) (fedIds,a,b,c,d,rms) = line.split(',',6)
try: try:
for id in fedIds.split('+'): for id in fedIds.split('+'):
fedSize = float(a)+float(b)*args['relEventSize']+float(c)*args['relEventSize']**2 fedSize = float(a)+float(b)*args['relEventSize']+float(c)*args['relEventSize']**2+float(d)*args['relEventSize']**3
outputFile.write("%d,%d,%d,1\n" % (int(id),int(fedSize)&~0x7,int(fedSize*float(rms))&~0x7)) outputFile.write("%d,%d,%d,1\n" % (int(id),int(fedSize)&~0x7,int(fedSize*float(rms))&~0x7))
eventSize += int(fedSize) eventSize += int(fedSize)&~0x7
except ValueError: except ValueError:
pass pass
Supports Markdown
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