Comments (5)
This is a very good catch! I am able to replicate the result. The error occurs in the Vts library and is independent of the Matlab interop code. I can reproduce the error using our WPF GUI Forward Solver panel and checking "use spectral panel inputs" to obtain R vs wavelength results using Basic MC and comparing with any other solver. Important difference: R(rho=10) mua=0.0666/mm mus'=1.2/mm produces a different result than R(rho=10,lambda=1000nm) using skin OPs mua=0.666/mm mus'=1.2/mm.
Okay this took me a little bit to debug, but I got it!! I'm providing details primarily for my fellow developers so please bear with me. The problem was that in the Basic MC code for R(rho) there are two loops, the outer loop loops over OPs and the inner loop loops over rhos. The array RatRhoMC was initialized outside of the outer loop, however it is created by a cumulative sum so if there were multiple OPs (or wavelengths), RatRhoMC was just growing and growing producing erroneous results for all OPs greater than the first. To fix this, I added an "Array.Clear" of RatRhoMC inside the outer loop. This problem also occurred in the code for ROfFx.
I have pushed these fixes to Github. It might take a little bit before we have a new Matlab interop download for you. I'll post when we do.
Thanks for finding this bug and helping us improve our code base!
Best,
Carole
from vts.
ccampb19 has also pointed out that another forward solver does not work across wavelength.
- Distributed Gaussian Source with beam diameter=0, check "use spectral panel inputs", select R(rho,ft), check "allow multi-axis selection", check lambda, leave rho and ft unchecked with rho=1mm ft=0GHz crashes the GUI.
I tried other solution domains and found two other setups that crash the GUI.
2) Distributed Gaussian Source with beam diameter=0, check "use spectral panel inputs", select R(fx,t), check "allow multi-axis selection", check lambda, leave fx and t unchecked with fx=0 and t=0.05ns crashes.
3) Distributed Gaussian Source with beam diameter=0, check "use spectral panel inputs", select R(rho,t), check "allow multi-axis selection", check lambda, leave rho and t unchecked with rho=1 and t=0.05ns crashes.
I'd like to fix these problems before we close this issue.
Carole
from vts.
I determined that the reason the GUI crashes for these selections is that time-dependent solutions for the DistributedGaussianSourceSDA solver are not implemented. I modified the GUI code so that when this forward solver is selected all time-dependent solution domain options (e.g. R(rho,time), R(rho,ft), R(fx,time), R(fx,ft)) are greyed out.
from vts.
from vts.
Hi,
I just wanted to close the loop on these issues.
- In the latest Matlab download, version 4.5 Beta, this scaled Monte Carlo now produces improved results.
- In the latest WPF GUI release, WPF Version 2.3 Beta, on the Forward panel when the user selects distributed Gaussian source, the Solution Domain options are R(rho) and R(fx), all others are greyed out.
Carole
from vts.
Related Issues (20)
- CI/CD - Github Actions to build Vts.sln and run Vts.Library.sln Tests upon PR submission
- Fix the SonarCloud issues in IForwardSover HOT 4
- Add ability to angle SurfaceFiberDetector
- Fix the 5 SonarCloud Bugs
- Fix bugs, security issues and maintenance issues in MCCL and MCPP
- Fix the bug in EllipsoidTissueRegion
- Reconfigure the detectors to use global code for the Binary Serializers HOT 65
- Fix the cognitive complexity issues from the Sonar Cloud analysis HOT 5
- Bug in 2 of the Detectors TransmittedMTOfXAndYAndSubregionHistDetector and ReflectedMTOfXAndYAndSubregionHistDetector HOT 2
- Preparation for the November release
- Vts Code and Scripting changes in preparation for Polyglot notebooks
- Add ability to use layered concentric infinite cylinders with refractive index mismatch HOT 2
- Move the FemModeling and MGRTE into a separate repository HOT 2
- Non-flat layered tissues for MCCL HOT 31
- Add ROfRhoAndTime dMC detectors
- Switch the plot labels for CAW & DAW
- SDA forward solvers need check on optical properties to make sure solution is valid HOT 4
- .NET Polyglot Notebook and Jupyter Notebook samples HOT 17
- RangeOfT enhancements for simplicity to consumers HOT 8
- Publish static web hosted documentation to Github Pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vts.