Skip to content
Snippets Groups Projects
Commit 563a394f authored by BRONES Romain's avatar BRONES Romain
Browse files

WIP modify simulation

* Trying to simulate the StopToCurrent going to mean value
* Simulation time is very very long... probably not a good idea
parent 6523d1f8
Branches dev_stoptocurrent
Tags 1.3.3
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -33,7 +33,7 @@ def generate_bpm_data(size, DC=0, A=0, F=100, N=0):
#############################################################################
N_BPM=respmat.shape[1]*2
N_PSC=respmat.shape[0]
size=200
size=2000
N_MM_RND=15
......@@ -100,6 +100,8 @@ for i in range(1,size):
corr[:,i] = np.clip(np.round(_corr/2**C_N_RND), -2**15, 2**15-1)
corravg = corr[:,:1024].mean(axis=1).astype('i4')
#############################################################################
# Write partial and results to files
......@@ -116,5 +118,8 @@ with open("corrout.txt", "w") as fp:
for i in range(size):
fp.write(" ".join(corr[:,i].astype("str"))+"\n")
with open("corravg.txt", "w") as fp:
for i in range(100):
fp.write(" ".join(corr[i].astype("str"))+"\n")
......@@ -187,7 +187,7 @@ begin
log("+-- Sending bpm packets", INFO);
--while (not endfile(read_file)) loop
while nturn < 20 loop
while nturn < 1500 loop
readline(read_file, line_v);
for I in 0 to C_NUMBPM-1 loop
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment