diff --git a/week3/README.MD b/week3/README.MD index 353d3867626168ea1b5c87f3bb855cbc39d9a296..2751a4d591520f4bed82012dca73424421220d7e 100644 --- a/week3/README.MD +++ b/week3/README.MD @@ -4,4 +4,4 @@ Code is [here](random_walker.py). - + diff --git a/week3/random_walker.py b/week3/random_walker.py index 24e797b4c15a206497a1032adb3a7ce239da5828..c2f38fd50227f0c00b43f8d6b2c865c0c53f5ffa 100644 --- a/week3/random_walker.py +++ b/week3/random_walker.py @@ -22,7 +22,6 @@ def build_LFSR(seed, bits_needed=1000): walker_states = np.zeros((10, 1000)) # create our seeds by grabbing a 16 bit number from the LSB of the current time in us -# cheating and just adding a fixed delay to get different seeds seeds = [] for i in range(10): delay = .1 @@ -41,7 +40,7 @@ timestep = np.array(range(1000)) import matplotlib.pyplot as plt plt.plot(walker_states.T) # transpose it so we can plot it -# for the 3 sigma lines, we will plot the sqrt of the timestep and divide the result by 1.5 to plot above and below the mean (0) +# for the 3 sigma lines, we will multiply the sqrt of the timestep and divide the result by 1.5 to plot above and below the mean (0) plt.plot(timestep, 1.5 * np.sqrt(timestep), color='black', alpha = 0.25) plt.plot(timestep, -1.5 * np.sqrt(timestep), color='black', alpha = 0.25) plt.show()