GithubHelp home page GithubHelp logo

christina200 / lightpropagation.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heltonmc/lightpropagation.jl

0.0 0.0 0.0 54.61 MB

Modeling light transport in turbid media

License: MIT License

Julia 100.00%

lightpropagation.jl's Introduction

LightPropagation.jl

Repo status GitHub tag (latest SemVer pre-release) MIT license Slack

Overview

Numerical implementations of analytical solutions to the radiative transport equation focused on modeling light propagation through turbid media like biological tissue.

Primary goals: provide fast, well-tested numerical recipes for use in inverse problems in biomedical optics research (though solutions can be used for a variety of applications in turbid media)

Current development is focused on solutions to the diffusion equation (and diffuse correlation equation). The library supports simulating the fluence and flux (using Fick's law) in the following geometries under the diffusion approximation: (a) Infinite, (b) Semi-Infinite, (c) Slab, (d) Parallelepiped, (e) Cylinder, (f) N-Layered Cylinder for the Steady-State (CW), Frequency-Domain (FD), and Time-Domains (TD).

We also provide fast interfaces for inverse fitting of time-domain measurements with consideration of the Instrument Response Function.

Installation

Install Julia by downloading the latest version from the offical site. This package requires Julia versions >=1.5.

LightPropagation.jl is a registered package in the Julia package manager. Just add the package to your environment using Julia's built-in package manager (accessed by pressing ] in the Julia REPL command prompt) to add the package and build all the required dependencies.

julia> ] add LightPropagation

julia> using LightPropagation

This will add the latest tagged release to your environment. LightPropagation.jl can be updated to the latest tagged release from the package manager with

julia> ] update LightPropagation

You can also add the package directly from GitHub to get the latest changes between releases:

julia> ] add "https://github.com/heltonmc/LightPropagation.jl.git"

LightPropagation.jl is only tested on Julia v1.5 and later. The package is under rapid development and breaking changes to the user API do occur, so update with care. Please open an issue if something breaks or doesn't seem right!

Quick Start

To see a list of all exported models check out the API in the documentation. LightPropagation.jl follows a naming pattern like PhysicalQuantity_Approximation_Geometry_Domain. For example, fluence_DA_semiinf_CW models the fluence under the diffusion approximation for the semi-infinite geometry in the steady-state (continuous wave) domain.

To see how to use a specific model we can type ? in the Julia REPL followed by the name of the model:

julia>?
help?> fluence_DA_semiinf_TD
search: fluence_DA_semiinf_TD fluence_DA_semiinf_CW

  fluence_DA_semiinf_TD(t, ρ, μa, μsp; n_ext = 1.0, n_med = 1.0, z = 0.0)

  Compute the time-domain fluence in a semi-infinite medium (Eqn. 33 Contini).

  Arguments
  ≡≡≡≡≡≡≡≡≡≡≡

    •  t: the time vector (ns).

    •  ρ: the source detector separation (cm⁻¹)

    •  μa: absorption coefficient (cm⁻¹)

    •  μsp: reduced scattering coefficient (cm⁻¹)

    •  n_ext: the boundary's index of refraction (air or detector)

    •  n_med: the sample medium's index of refraction

    •  z: the z-depth in medium

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> fluence_DA_semiinf_TD(0.1:0.1:1.0, 1.0, 0.1, 10.0, n_ext = 1.0, n_med = 1.0, z = 0.0)

This will give the function header, a description of the model, description of arguments, and an example on how to execute it. More detailed information on usage and examples can be found in the documentation. If any problem is observed in the documentation or running a model please file an issue!

How to support and contribute

You can support the project by actively using it and raising issues. User feedback on API is especially appreciated as we hope to get to a more stable (v1.0) release. If you like the project you can also leave a star.

Feature requests are especially important as we want this to be in anway helpful in your research or personal enjoyment. For example, if you need more example scripts for loading that weird TCSPC data... or you want us to support a new model... let us know! Opening an issue or a discussion will be the best place to do this.

Contributions via pull request are also greatly appreciated and we would love to have your help no matter the size of contribution. If new to Julia or Git, we are happy to help you through the process. Let us know by opening an issue if you would like to work on a new feature or if you are new to open-source and want to find a cool little project or issue to work on that fits your interests! We are more than happy to help you along the way. If a model is not giving expected results, not performing the way you would expect, not matching your implementation please let us know! Some good first issues would be increasing performance of existing functions, adding more tests, or creating better documentation.

Citing

We hope you fork and modify the existing code base in anyway for your application. If you make an enhancement to the code please either try to become a contributor or let us know where we could be better! If you use one of the models in your research please cite the original authors who derived the equations.

Contact

The best place to discuss usage, errors, bugs, features/requests, and potential contributions are in the issues and discussion forums here so everyone can benefit and participate. For more casual discussion, join us on Slack. For other questions, please contact Michael Helton.

lightpropagation.jl's People

Contributors

christina200 avatar heltonmc avatar

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.