Skip to content

Commit

Permalink
correct mass for PDist.macroparticles
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilianorgren committed Dec 9, 2024
1 parent afc3d8e commit c43a0c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PDist.m
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@
if doScpot, tmp_energy = tmp_energy - scpot.data(it); end
tmp_azim = azim_edges(iAzim) + dazim*rand(N,1); % deg
tmp_polar = polar_edges(iPolar) + dpolar*rand(N,1); % deg
tmp_v = sqrt(tmp_energy*units.eV*2/units.me)/1000; % km/s
tmp_v = sqrt(tmp_energy*units.eV*2/mass)/1000; % km/s

if doScpot % check if energy is negative, then skip
if iEnergy>6;
Expand Down Expand Up @@ -3982,6 +3982,7 @@

% Data from PDist in spherical coordinate system
sizedata = obj.datasize;
mass = obj.mass;

switch method
case 'center' % add particles to the center of the bin
Expand Down

0 comments on commit c43a0c6

Please sign in to comment.