Koma is a framework to efficiently simulate Magnetic Resonance Imaging (MRI) acquisitions. The main focus of this package is to simulate general scenarios that could arise in pulse sequence development.
43 Stars
Updated Last
11 Months Ago
Started In
April 2020

Main project
Documentation KomaMRI.jl Paper Build Status
KomaMRI.jl KomaMRICore.jl KomaMRIPlots.jl

KomaMRI.jl (formerly MRIsim.jl), whose name comes from the Japanese word for spinning-top こま (ko-ma) as they precess due to gravity like spins in a magnetic field.

This package is meant to simulate general Magnetic Resonance Imaging (MRI) scenarios that could arise in pulse sequence development.

🟢 [6 Mar 2023] Paper published in MRM 😃! The open access article is available here.

🟢 [8 Dec 2022] KomaMRI v0.7: Huge code rewrite, this implies improved: performance (now 5x faster), type stability, extensibility, and more!

🟢 [17 May 2022] ISMRM 2022 presentation: My abstract presentation is now uploaded here!

☰ Roadmap


  • Phantom and Sequence data-types,
  • Spin preccesion in gradient-only blocks (simulation optimization),
  • GPU accelaration using CUDA.jl,
  • RF excitation,
  • GPU accelaration of RF excitation,
  • Scanner data-type: , etc.,
  • Pulseq IO,
  • Signal "Raw Output" dictionary (ISMRMRD),
  • MRIReco.jl for the reconstruciton,
  • Documentation,
  • decay,
  • Auxiliary Pulseq functions,
  • Coil sensitivities,
  • Cardiac phantoms, and triggers.


  • Diffusion models with Laplacian Eigen Functions,
  • Magnetic susceptibility,
  • Use PackageCompiler.jl to build a ditributable core or app.


To install just write the following in the Julia REPL:

] add KomaMRI

First run

KomaMRI.jl comes with a handy GUI that contains a brain phantom with an EPI sequence. To open it use:

using KomaMRI

Press the button that says "Simulate!" to do your first simulation :). Then, a notification emerge telling you that the simulation was successful. In this notification, you can either select to (1) see the Raw signal or (2) to procced with the reconstruction.

How to cite

If you use this package please acknowledge us by citing our paper.

How to cite:

Castillo-Passi, C, Coronado, R, Varela-Mattatall, G, Alberola-López, C, Botnar, R, Irarrazaval, P. KomaMRI.jl: An open-source framework for general MRI simulations with GPU acceleration. Magn Reson Med. 2023; 1- 14. doi: 10.1002/mrm.29635


author = {Castillo-Passi, Carlos and Coronado, Ronal and Varela-Mattatall, Gabriel and Alberola-López, Carlos and Botnar, René and Irarrazaval, Pablo},
title = {KomaMRI.jl: An open-source framework for general MRI simulations with GPU acceleration},
journal = {Magnetic Resonance in Medicine},
keywords = {Bloch equations, GPU, GUI, Julia, open source, simulation},
doi = {},
url = {},
eprint = {},

Koma GUI