-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support --bc or cfg.bc to set an entire bounding face as detector
- Loading branch information
Showing
8 changed files
with
95 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% MCXLAB - Monte Carlo eXtreme for MATLAB/Octave by Qianqina Fang | ||
% | ||
% In this example, we show how to set the 7-12 elements of cfg.bc to | ||
% indicate a planar detector along a boundary facet | ||
% | ||
% This file is part of Monte Carlo eXtreme (MCX) URL:http://mcx.sf.net | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
clear cfg cfgs | ||
cfg.nphoton=1e5; | ||
cfg.vol=uint8(ones(60,60,60)); | ||
cfg.srcpos=[30 30 1]; | ||
cfg.srcdir=[0 0 1]; | ||
cfg.gpuid=1; | ||
% cfg.gpuid='11'; % use two GPUs together | ||
cfg.autopilot=1; | ||
cfg.prop=[0 0 1 1;0.005 1 0 1.37]; | ||
cfg.tstart=0; | ||
cfg.tend=5e-9; | ||
cfg.tstep=1e-10; | ||
|
||
% calculate the flux distribution with the given config | ||
cfg.bc='______111110'; % capture photons existing from all faces except z=z_max | ||
cfg.savedetflag='dpx'; | ||
|
||
[flux,detpt]=mcxlab(cfg); | ||
plot3(detpt.p(:,1),detpt.p(:,2),detpt.p(:,3),'r.'); | ||
view([0 0 -1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters