Thanks for any help.Peter
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To post to this group, send email to mcx-...@googlegroups.com.
Visit this group at http://groups.google.com/group/mcx-users.
For more options, visit https://groups.google.com/d/optout.
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
I'm assuming the weighting factor would just be exp(-mu_a*PL) for all media. Thank you very much.
I seem to be off by a factor of ten. Ten times less than what I expect the path length to be.
the above command gave me 79.3 mm, given the distance between
cfg.nphoton=1e8;
cfg.vol=uint8(ones(60,60,60));
cfg.srcpos=[30 30 1];
cfg.srcdir=[0 0 1];
cfg.gpuid=1;
cfg.autopilot=1;
cfg.prop=[0 0 1 1;0.005 1 0 1.37];
cfg.tstart=0;
cfg.tend=5e-9;
cfg.tstep=5e-10;
cfg.detpos=[30 20 1 1;30 40 1 1;20 30 1 1;40 30 1 1];
[flux dets]=mcxlab(cfg);
% find the photons detected by det#1
idx=find(dets.data(1,:)==1);
ppl=dets.data(3,idx)';
% weighted average of pathlength
s
sum(ppl.*exp(-cfg.prop(2,1).*ppl))./(sum(exp(-cfg.prop(2,1).*ppl)))
% find the photons detected by det#1
idx=find(dets.data(1,:)==1);
ppl_1=dets.data(3,idx)'; % layer1
ppl_2=dets.data(4,idx)'; % layer2
% weighted average of pathlength
s
sum((ppl_1+ppl_2).*exp(-cfg.prop(2,1).*ppl_1).*exp(-cfg.prop(3,1).*ppl_2))./(sum(exp(-cfg.prop(2,1).*ppl_1).*exp(-cfg.prop(3,1).*ppl_2)))
So for multi-layer medium, should it be like this? (take 2 layer)
% find the photons detected by det#1
idx=find(dets.data(1,:)==1);
ppl_1=dets.data(3,idx)'; % layer1
ppl_2=dets.data(4,idx)'; % layer2
% weighted average of pathlength
s
sum((ppl_1+ppl_2).*exp(-cfg.prop(2,1).*ppl_1).*exp(-cfg.prop(3,1).*ppl_2))./(sum(exp(-cfg.prop(2,1).*ppl_1).*exp(-cfg.prop(3,1).*ppl_2)))
Visit this group at https://groups.google.com/group/mcx-users.