GithubHelp home page GithubHelp logo

Comments (8)

jgroehl avatar jgroehl commented on May 29, 2024

Should this be implemented as a test or as a set of utils functions that are available to the user?

We could provide the methods for the user and test them in an integration test.

from simpa.

leoyala avatar leoyala commented on May 29, 2024

I think that in general, it would be nice if SIMPA would implement these checks before launching the actual simulations. And then throw a warning in case some checks are not passed. This would put more assurance in the whole pipeline.
It would propose to integrate it in utils and then each simulation_module can use it for any type of volume that needs checking.

from simpa.

jgroehl avatar jgroehl commented on May 29, 2024

What would be the best behaviour in case this does actually happen?
Should the simulations stop and crash with an appropriate error message?
Should the simulations continue and just log a warning?

Probably raising an exception is the best thing to do. However, this must be properly documented, such that a user can write a batch process accordingly. It would be terrible if simulations don't run through the night, because one volume, in the beginning, had an error.

from simpa.

jgroehl avatar jgroehl commented on May 29, 2024

"That both volumes Tags.PROPERTY_ABSORPTION_PER_CM and Tags.PROPERTY_SCATTERING_PER_CM are defined in the same regions. It would not make sense to have one set to 0 in a region while the other is different than 0?"

I am not sure I agree with this. In reality, you will probably never have actually 0 absorption or scattering, but there certainly are synthetic cases where you might want to have this.
What is it that you want to test in this case? That each molecular composition provide values for both scattering and absorption? In that case, we might want to add a QA method that does sanity testing for a given molecular composition.
@leoyala please feel free to open an issue if this is what you meant.

from simpa.

jgroehl avatar jgroehl commented on May 29, 2024

"Add a flag that forces the simulations in case it is desired"

Will include Settings Tag IGNORE_QA_ASSERTIONS". Standard will be False` and it should be used in a way that the QA is actually not performed at all if set. This way, this can be USD as a performance optimisation flag.

from simpa.

jgroehl avatar jgroehl commented on May 29, 2024

If Tags.IGNORE_QA_ASSERTIONS is not set to True, the simulation will now always test the following:

  • volume creation creates volumes of equal size
  • volume creation creates volumes that are not NaN or INF
  • optical model will test if fluence and initial pressure are non negative (and do not contain INF or NaN)
  • acoustic model creates volumes that are not NaN or INF
  • reconstruction model creates volumes that are not NaN or INF
  • noise components create volumes that are not NaN or INF

from simpa.

jgroehl avatar jgroehl commented on May 29, 2024

When running the example scripts, this had no noticeable effect on the performance.

from simpa.

jgroehl avatar jgroehl commented on May 29, 2024

Pushed to develop with 61e8ca9

from simpa.

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.