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

fix(sim): simulation dataset

parent b9c9fb19
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -70,10 +70,10 @@ C_N_A_RND = 8
SUMSAT=36
K_A = 218
K_B = -186
K_iC = 325
K_D = -3225
K_A = 256
K_B = 0
K_iC = 64
K_D = -16300
## -----------------------
......@@ -92,10 +92,10 @@ for i in range(size):
# Step 3: correction computation
corr = np.zeros((N_PSC, size), dtype="int64")
_corr = (np.round(mm[:,0].astype('i8')*K_A*2**-C_N_RND)*K_iC).astype("int64")
_corr = (np.round(mm[:,0].astype('i8')*K_A*2**-C_N_A_RND)*K_iC).astype("int64")
corr[:,0] = np.clip(np.round(_corr/2**C_N_RND), -2**15, 2**15-1).astype('i8')
for i in range(1,size):
_sum = (np.round(mm[:,i].astype('i8')*K_A*2**-C_N_RND)).astype('i8') + mm[:,i-1].astype('i8')*K_B + corr[:,i-1]*K_D
_sum = (np.round(mm[:,i].astype('i8')*K_A*2**-C_N_A_RND)).astype('i8') + mm[:,i-1].astype('i8')*K_B + corr[:,i-1]*K_D
_corr = np.clip(_sum, -2**(SUMSAT-1), 2**(SUMSAT-1)-1)*K_iC
corr[:,i] = np.clip(np.round(_corr/2**C_N_RND), -2**15, 2**15-1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment