Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elliotb256/imaging_diffusion
An example of using AtomECS to simulate diffusion in an imaging system
https://github.com/elliotb256/imaging_diffusion
Last synced: 5 days ago
JSON representation
An example of using AtomECS to simulate diffusion in an imaging system
- Host: GitHub
- URL: https://github.com/elliotb256/imaging_diffusion
- Owner: ElliotB256
- Created: 2022-01-14T16:57:39.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-18T12:06:06.000Z (almost 3 years ago)
- Last Synced: 2024-11-09T20:05:00.327Z (2 months ago)
- Language: Rust
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# imaging_diffusion
This repo shows an example of using AtomECS to simulate diffusion in an imaging system.
We use atomecs to simulate the scattering of photons by a cloud of atoms, and integrate the resulting atomic motion.
* The simulation takes an `atoms.h5` file which defines the initial positions and velocities of atoms to simulate.
* The `PhotonOutputter` resource creates an h5 file which stores all of the output information.
* The `RegisterPhotonsSystem` runs each frame, and stores generated photons in the h5 file.
* The `RegisterInitialAtomsSystem` stores the initial positions and velocities of atoms in the h5 file.
## How to run
* The first time you run you will need to generate a suitable input file. You can do this by running the first cell of `analyse.m`.
* To run the program use `cargo run --release`. The `--release` flag indicates the compiler should use optimisations to increase program performance.
* You can plot generated photons using the final cell of `analyse.m`.
![example photon positions](assets/photon_positions.png)