Skip to content

Commit

Permalink
Update particle_diagnostics.cpp to attempt to add behavior for times_…
Browse files Browse the repository at this point in the history
…logarithmic==0
  • Loading branch information
hayes2419 authored Mar 5, 2024
1 parent 550b152 commit 1884cfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/particle_diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ void particle_diagnostics::operator()(std::size_t indx)
gitr_precision p_time = particlesPointer->time[indx] - particlesPointer->transitTime[indx];
particlesPointer->transitTime[indx] = particlesPointer->time[indx];

int ind_time = std::floor((std::log10(p_time) - bin_edge_0_time)/bin_edge_dt);
if (angle_logarithmic==1) int ind_time = std::floor((std::log10(p_time) - bin_edge_0_time)/bin_edge_dt);
else int ind_time = std::floor((p_time - bin_edge_0_time)/bin_edge_dt);

int ind_2d_time = surfaceHit*n_bins_time + ind_time;

Expand Down

0 comments on commit 1884cfa

Please sign in to comment.