Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 26 May 2020 starting at approximately 10am CDT. It is expected to take around 30 minutes and will involve a short period of downtime, around 5 minutes, towards the end of the maintenance period. Please address any questions, comments, or concerns to uwm-help@cgca.uwm.edu.

Commit 55cd03aa authored by Andrew Wade's avatar Andrew Wade

Fixed error var naming

parent dbcdf899
......@@ -220,7 +220,7 @@ def ANDChannels(chanList): # find boolean AND of a list of binary EPICs chans
return all([RCPID.read(ii, log=False) for ii in chanList])
def truncFloat(x,dp):
def truncFloat(x, dp):
'''Truncates a numpy float to given decimal places (dp)'''
return np.trunc(x * 10 ** dp) / 10 ** dp
......@@ -232,14 +232,15 @@ def probRound(x, dp):
xTrunc = truncFloat(x, dp) # Truncate to dp figures
xrem = x - xTrunc # find remainder of truncation
p = np.abs(xrem) * 10 ** dd # prob of rounding up based on trunc remainder
if np.random.uniform(0,1) < p:
xout = xTrunc + np.sign(x) * 10 ** -dd
p = np.abs(xrem) * 10 ** dp # prob of rounding up based on trunc remainder
if np.random.uniform(0, 1) < p:
xout = xTrunc + np.sign(x) * 10 ** -dp
else:
xout = xTrunc
return xout
def grabInputArgs():
parser = argparse.ArgumentParser(
description="PID control script that reads out and controls EPICS"
......
Markdown is supported
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