Dear Dr. Fang,
Hi, I'm Naim. First and foremost, thank you for this incredible work which has proven to be very useful for the work I've been doing.
I wanted to ask a question about multiple sources in mcxlabcl. I can see that cfg.srcpos can accomodate multiple sources by means of a multi-row array in mcxlab, but this does not appear to be the case for mcxlabcl?
The reason for this question is that I use MATLAB on my no-GPU Macbook Pro M3 Max (which funnily enough I thought would be powerful enough when I bought it!) to write, test and debug my code, before deploying it on a high performance computing cluster with GPUs. I have a six 'disk' light source configuration as follows:
% Source positions in circular configuration at z=100 plane
cfg.srcpos = [
60, 50, 100;
10*cos(pi()/3)+50, 10*sin(pi()/3)+50, 100;
-10*cos(pi()/3)+50, 10*sin(pi()/3)+50, 100;
40, 50, 100;
-10*cos(pi()/3)+50, -10*sin(pi()/3)+50, 100;
10*cos(pi()/3)+50, -10*sin(pi()/3)+50, 100];
% Unit vectors for downward (i.e. top down) trajectory from sources
cfg.srcdir = [
0 0 -1;
0 0 -1;
0 0 -1;
0 0 -1;
0 0 -1;
0 0 -1;
];
% Each source has a 5*60um radius
cfg.srcparam1 = [
5 0 0 0;
5 0 0 0;
5 0 0 0;
5 0 0 0;
5 0 0 0;
5 0 0 0;
];
MCXLAB with a GPU recognises six light sources and runs the simulation correctly, but MCXLABCL recognises only one light source and produces an error regarding cfg.srcdir in that it can only be a single row array (i.e. [0, 0, -1]).
The "workaround" for the MCXLABCL version is that I would iteratively run six instances of MCXLABCL in a for loop, each with the corresponding row of cfg.srcpos, and then average out flux.data for the entire volume. Inefficient code on an inefficient machine!
I was just wondering if this is a bug on my end or if this is a feature difference between mcxlab and mcxlabcl?
Thanks in advance!
Best wishes,
Naim