Dear Prof. Fang,
I hope you're well.
I have a question regarding the difference in source positioning during simulation. Specifically, I simulated a two-layer slab model and positioned the source and detector according to the following MATLAB code:
cfg.nphoton=1e8;% 3D volumecfg.vol=uint8(ones(200,200,200));cfg.vol(:,:,11:end)=2; % 1st layer thickness: 10 mmcfg.unitinmm = 1;% sourcecfg.srctype='isotropic';cfg.srcpos=[85 100 1];cfg.srcdir=[0 0 1];% detectorcfg.detpos=[115 100 1 1];cfg.issrcfrom0=0;
% source
The number of detected photons slightly decreased to 3835.cfg.srctype='isotropic';cfg.srcpos=[85 100 0];cfg.srcdir=[0 0 1];% detectorcfg.detpos=[115 100 0 1];cfg.issrcfrom0=1;
I greatly appreciate your time and guidance, and I look forward to your response.
Best regards,
Brighten
hi Brighten,
sorry for the delay. have been buys with a few deadlines.
the effect of cfg.issrcfrom0=1 is to basically subtract
srcpos/detpos by 1 -- issrcfrom0=1 assumes the lower-bottom corner
(origin) of the 3D volume has a coordinate of [0,0,0] and
issrcfrom0=0 assumes that origin is [1,1,1].
the physical placement of your source/detector relative to the domain in the z-axis are identical for your two settings.
the src/det x/y placement are offset by 1, but the relative positions between the source and the detector remains the same, so, the captured photons are expected to be nearly the same.
let me know if this makes sense.
Qianqian
--
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 view this discussion visit https://groups.google.com/d/msgid/mcx-users/CABOqd3FybaR-4Xdx_ha5Lgm0_Hx4mzr79iZFGOmSS-Li475q9Q%40mail.gmail.com.
hi Brighten,
I suggest you call mcxpreview(cfg) and plot the domain for the two settings, it should place the source relative to the medium layer by following the cfg issrcfrom0 flag settings.
you can potentially see if there is a relative offset between the source and the domain, and adjust it accordingly in your analytical model.
Qianqian