Skip to content

Commit

Permalink
Update Let_perturb with E0 as Emax
Browse files Browse the repository at this point in the history
  • Loading branch information
zoeprieto authored May 2, 2024
1 parent a7230fc commit 751a2ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/kdsource/geom.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ int E_perturb(const Metric* metric, mcpl_particle_t* part, double bw, char kerne
return 0;
}
int Let_perturb(const Metric* metric, mcpl_particle_t* part, double bw, char kernel){
part->ekin *= exp(bw*metric->scaling[0] * rand_type(kernel));
float E = part->ekin;
E *= exp(bw*metric->scaling[0] * rand_type(kernel));
while(E > metric->params[0]){
E = part->ekin;
E *= exp(bw*metric->scaling[0] * rand_type(kernel));
}
part->ekin = E;
return 0;
}

Expand Down

0 comments on commit 751a2ef

Please sign in to comment.