This project has moved. For the latest updates, please go here.

pMC - don't forget PerturbedRegionsIndices (like I did)

Coordinator
Oct 15, 2014 at 12:22 AM
Just a note if it helps someone out there doing pMC. Yesterday, we thought we had a bug in our simulations, but in fact, we just forgot to update the PerturbedRegionsIndices. If you have a multi-layer model and you're perturbing multiple layers, make sure you have all the perturbation layers "turned on" using PerturbedRegionsIndices. E.g.:

                    pMCDetector = DetectorInput.pMCROfRho(rhos);
                    pMCDetector.PerturbedRegionsIndices = [1]; % WRONG - should be [1, 2]
                    pMCDetector.PerturbedOps = ...
                        [...
                        [1e-10, 0.0, 0.0, 1.0]; ...
                        [mua1,  musp1, g1,  n1]; ...
                        [mua2,  musp2, g2,  n2]; ...
                        [1e-10, 0.0, 0.0, 1.0]; ...
                        ];
This seems like something we might be able to detect and set automatically in the future.