Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev_MonteCarlo' into dev_Monte…
Browse files Browse the repository at this point in the history
…Carlo
  • Loading branch information
burigolucas committed Jan 29, 2021
2 parents b2f2c4c + 3eec663 commit 449a49f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions topas/MatRad_TopasConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ function writeStfFields(obj,ct,stf,baseData,w)

historyCount(beamIx) = uint32(obj.fracHistories * nBeamParticlesTotal(beamIx) / obj.numOfRuns);

if historyCount < cutNumOfBixel || cutNumOfBixel == 0
obj.matRad_cfg.dispError('Insufficient number of histories!')
end

while sum([dataTOPAS.current]) ~= historyCount(beamIx)
% Randomly pick an index with the weigth given by the current
idx = 1:length(dataTOPAS);
Expand Down

0 comments on commit 449a49f

Please sign in to comment.