Git Product home page Git Product logo

Comments (5)

hayakawa16 avatar hayakawa16 commented on June 7, 2024

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.

hayakawa16 avatar hayakawa16 commented on June 7, 2024

ccampb19 has also pointed out that another forward solver does not work across wavelength.

  1. 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.

hayakawa16 avatar hayakawa16 commented on June 7, 2024

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.

dcuccia avatar dcuccia commented on June 7, 2024

from vts.

hayakawa16 avatar hayakawa16 commented on June 7, 2024

Hi,
I just wanted to close the loop on these issues.

  1. In the latest Matlab download, version 4.5 Beta, this scaled Monte Carlo now produces improved results.
    ccampbell
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.