Skip to content

ofgulban/slowest-particle-simulator-on-earth

Repository files navigation

Slowest particle simulator on earth

Just a fun project to learn about particle simulations. Developed for applying particle physics to magnetic resonance images (nifti file format).

Dependencies

Python 3

Package Tested version
NumPy 1.17.2
Matplotlib 3.1.1
Nibabel 2.2.1

Installation

pip install slowest_particle_simulator_on_earth

Usage

Type the following command on your command line:

slowest_particle_simulator_on_earth /path/to/image.nii.gz --slice_number 3 --thr_min 200 --thr_max 500

Note: You can select different slice numbers. For now the slices can only be chosen on one axis. I am going to make this more flexible later.

Making a gif

slowest_particle_simulator_on_earth creates individual pictures which can be compiled into an animated gif. I use the following command (on linux) to convert the frames into animated gifs:

convert -delay 1 -loop 0 /path/to/export/*.png out.gif

You can change -delay parameter to make your gif faster or slower.

Alternatively, you can also create a movie rather than a gif:

ffmpeg -r 30 -i /path/to/export/frame_%03d.png -pix_fmt yuv420p -r 30 out.mp4

Support

Please use GitHub issues for questions, bug reports or feature requests.

License

This project is licensed under BSD-3-Clause.

About

A half-serious project to generate **very** serious brain explosions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages