Skip to content
Snippets Groups Projects
Commit 7aee9de0 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

fix f2 component, partial fix for amplitudes

parent c861aadb
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -1223,19 +1223,19 @@ int joint_rspace_PDF(
ptrdiff_t *local_histm = local_histm_threaded.getMine();
double mag1, mag2;
mag1 = 0;
mag2 = 0;
mag1 = 0.0;
mag2 = 0.0;
for (unsigned int i=0; i<3; i++)
{
double val1 = f1->rval(rindex, i);
mag1 += val1*val1;
int bin1 = int(floor((val1 + max_f1_estimate[i])/bin1size[i]));
mag2 = 0.0;
for (unsigned int j=0; j<3; j++)
{
double val2 = f2->rval(rindex, i);
double val2 = f2->rval(rindex, j);
mag2 += val2*val2;
int bin2 = int(floor((val2 + max_f2_estimate[i])/bin2size[i]));
int bin2 = int(floor((val2 + max_f2_estimate[j])/bin2size[j]));
if ((bin1 >= 0 && bin1 < nbins) &&
(bin2 >= 0 && bin2 < nbins))
local_histc[(bin1*nbins + bin2)*9 + i*3 + j]++;
......
......@@ -11,10 +11,25 @@ def main():
df.close()
f = plt.figure()
a = f.add_subplot(111)
a = f.add_subplot(211)
a.plot(acc_hist[0, :, :3])
a.plot(np.sum(acc_vel_histc[0, :, :, :, 0], axis = 1), dashes = (1, 1))
f.savefig('sanity_test.pdf')
a = f.add_subplot(212)
a.plot(acc_hist[0, :, 3])
a.plot(np.sum(acc_vel_histm[0, :, :], axis = 1), dashes = (1, 1))
f.tight_layout()
f.savefig('sanity_test_acceleration.pdf')
plt.close(f)
f = plt.figure()
a = f.add_subplot(211)
a.plot(vel_hist[0, :, :3])
a.plot(np.sum(acc_vel_histc[0, :, :, 0, :], axis = 0), dashes = (1, 1))
a = f.add_subplot(212)
a.plot(vel_hist[0, :, 3])
a.plot(np.sum(acc_vel_histm[0, :, :], axis = 0), dashes = (1, 1))
f.tight_layout()
f.savefig('sanity_test_velocity.pdf')
plt.close(f)
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment