C = 2**24-(2**24-1)/PS
PS = 1 --> C = 1
PS = 2 --> C = 8388609
PS = 10 --> C = 15099495
PS = 1000 --> C = 16760439
PS = 10000 --> C = 16775539
PS = 2**24-1 --> C = 2**24-1
Definition at line 24 of file PrescaleHelper.py.
26 C = 2**24-(2**24-1)/PS
29 PS = 2 --> C = 8388609
30 PS = 10 --> C = 15099495
31 PS = 1000 --> C = 16760439
32 PS = 10000 --> C = 16775539
33 PS = 2**24-1 --> C = 2**24-1
37 raise RuntimeError(
"L1 Prescale value of 0 is not allowed")
39 sign = -1
if prescale<0
else 1
40 prescale = abs(prescale)
41 cut=sign * ( 0x1000000 - (0xFFFFFF/prescale) )
43 if prescale > 0xFFFFFF:
44 cut=sign * (0x1000000-1)