Skip to main content

Sycomore — an MRI simulation toolkit

PyPI - Wheel Conda Version

Sycomore is an MRI simulation toolkit providing Bloch simulation, Extended Phase Graph (EPG) (both regular and discrete, including 3D), and Configuration Model. Sycomore is a Python packge in which all computationnaly-intensive operations are run by a C++ backend, providing a very fast runtime.

Sycomore is free software, released under the MIT license, and its source code is available on GitHub.

A sample web application, using Sycomore paired with Bokeh is available on Heroku: it presents classical MRI experiments (RARE, RF-spoiling, slice profile with a selective sinc pulse), using the different simulation models of Sycomore.

Installation

Packaged versions of Sycomore are available on pypi and Anaconda for Linux, macOS and Windows.

To install from Anaconda, type conda install -c conda-forge sycomore. To install from pypi, type pip3 install sycomore (or pip install sycomore). If you are installing from pypi and no pre-compiled version is available for your platform, pip will try to install from the source archive.

If you need to install Sycomore from source, you will need a C++11 compiler, CMake, xsimd and pybind11 to successfully build Sycomore. If you want to validate your build of Sycomore, you should run the unit tests, which require Boost.Test.

Additional details are provided in the documentation.

Usage

The following code simulates a single repetition of a simple RARE sequence using regular EPG and plots the transverse magnetization of each echo.

import matplotlib.pyplot
import numpy
import sycomore
from sycomore.units import *

species = sycomore.Species(1000*ms, 100*ms, 1*um**2/ms)
TE = 4*ms
train_length = 40

model = sycomore.epg.Regular(species)
data = numpy.zeros(train_length, dtype=[("time", sycomore.Quantity), ("signal", complex)])

model.apply_pulse(90*deg)
for echo in range(train_length):
    model.apply_time_interval(TE/2)
    model.apply_pulse(180*deg)
    model.apply_time_interval(TE/2)
    
    data[echo] = (((1+echo)*TE), model.echo)

times = [x.convert_to(ms) for x in data["time"]]
magnitude = numpy.abs(data["signal"])
matplotlib.pyplot.plot(times, magnitude, ".", label="Simulated")
matplotlib.pyplot.plot(
    times, [numpy.exp(-(x*species.R2).magnitude) for x in data["time"]],
    label="$T_2$ decay")

matplotlib.pyplot.ylim(0,1)
matplotlib.pyplot.xlabel("Time (ms)")
matplotlib.pyplot.ylabel("Magnitude")
matplotlib.pyplot.legend()
matplotlib.pyplot.show()

T2 decay in RARE

The features and data structures are described in the documentation:

Metadata

Release files for sycomore 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sycomore 1.3.2
File Size Uploaded
sycomore-1.3.2.tar.gz 605.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for sycomore 1.3.2
File
sycomore-1.3.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
sycomore-1.3.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.12+ x86-64 Details
sycomore-1.3.2-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details
sycomore-1.3.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
sycomore-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details
sycomore-1.3.2-cp39-cp39-macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) Details
sycomore-1.3.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
sycomore-1.3.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details
sycomore-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
sycomore-1.3.2-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
sycomore-1.3.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details
sycomore-1.3.2-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details
sycomore-1.3.2-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
sycomore-1.3.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details
sycomore-1.3.2-cp36-cp36m-macosx_10_9_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64 Details

Total release size: 9.0 MB

Release files / sycomore-1.3.2.tar.gz

Download URL sycomore-1.3.2.tar.gz
Size 605.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0ebb86eddf728da6c3436a4d822a0e84fa57f8969946a99a0953951c00f1829f
BLAKE2b-256 checksum
How to use checksums
703eac6ad805186e9057786e58ee55d0da38618210b078bd844bff1bc15c5b56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp310-cp310-win_amd64.whl

Download URL sycomore-1.3.2-cp310-cp310-win_amd64.whl
Size 956.1 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
1c555d208e2dc966777f524c0510c318bcc4f7e6d20e69670fa7fdf9af191a5c
BLAKE2b-256 checksum
How to use checksums
fa037c135ff071949e75161ef953c1b4e8fb8500138558c43d6ff6a21edce59e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL sycomore-1.3.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 353.8 kB
Tags CPython 3.10 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
c339ea23942ccd9fb981cd54714e5dd2b3dcf4de684dca68703e40d05ba228e3
BLAKE2b-256 checksum
How to use checksums
277dca6bd2499413558333a38a65ef0b771b92f7758675c5c8e037fa4e86e5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp310-cp310-macosx_10_9_universal2.whl

Download URL sycomore-1.3.2-cp310-cp310-macosx_10_9_universal2.whl
Size 369.5 kB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2024ba458a77ae882da93ad2c340af0c86e323e4b3ae61800f296eacf319d6c6
BLAKE2b-256 checksum
How to use checksums
7dd24a309429bb8e517e9710af4e4e02c9aa7ee91d8398056dd1fde69a0efb29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp39-cp39-win_amd64.whl

Download URL sycomore-1.3.2-cp39-cp39-win_amd64.whl
Size 956.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
f28853ecb1f47ada1969686b7a7882d79697dc72b6eab8c38d9d63745a1d4915
BLAKE2b-256 checksum
How to use checksums
11f513fbf7dc82f24b84a72cf5411ace06f6463610b0f874b3576ff5eda818fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL sycomore-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 354.0 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
d1412a347bb8e4ca1ece539dbbdc5f2280e5819ab8d46d06b3efdfac05ad8456
BLAKE2b-256 checksum
How to use checksums
61798a498f0c4154468f0783d93594af6116df09da519530b554273cb99afc23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp39-cp39-macosx_10_9_universal2.whl

Download URL sycomore-1.3.2-cp39-cp39-macosx_10_9_universal2.whl
Size 369.6 kB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
3537f67fe4f41c704980e26c8e6ca2bd17280a2336f5e540f83261bd682b323a
BLAKE2b-256 checksum
How to use checksums
ebc1311f849bb4a0757a2343e08d1e6c1c19af8eabfe3a038dbcbed1e999e8ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp38-cp38-win_amd64.whl

Download URL sycomore-1.3.2-cp38-cp38-win_amd64.whl
Size 953.8 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
4ef05f880a1a12301a3f7b280f3a9689d2583af52e2881358430b84d8c5f8dbd
BLAKE2b-256 checksum
How to use checksums
cbb47b41455f2d07917c5e466b46cc1b10353904dba440644a5d9b5fdd3414d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL sycomore-1.3.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 353.7 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
fbe57be24f51f6445115498c2dcef8164c5143ca477b378cc028b4e09df1b480
BLAKE2b-256 checksum
How to use checksums
9bb6e1bfbbff6dd70d4c1fe315b918397fef54eff83bdfd37bdba1548a18b040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl

Download URL sycomore-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl
Size 369.5 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
cc977ecc04aaa6eabb62adfe4cf82f6b74a2abcfea46a646eec6b1b63203b64e
BLAKE2b-256 checksum
How to use checksums
5b0cb58abcacaa9589300d89d90b5f29478f32e9834c4a1f41fadf85c1cd415f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp37-cp37m-win_amd64.whl

Download URL sycomore-1.3.2-cp37-cp37m-win_amd64.whl
Size 949.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
5c0c7e32c8c2a249ec5d1bf3df5a031762ec30a031cb0b47bb950e36e51610fb
BLAKE2b-256 checksum
How to use checksums
750d1ac144bb5c6eebdcfe6627fee9702dd9cd624f797c5dfcb8acef7d3c3fea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL sycomore-1.3.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 368.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
c3446241d546b918ee5a235af3f8b8017c47b26a25440dec63c9c8bf18abd343
BLAKE2b-256 checksum
How to use checksums
4576321f320d5fbe1e8f4b820dc83e078fbc1230b65690e7f1eba6df2674e3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL sycomore-1.3.2-cp37-cp37m-macosx_10_9_x86_64.whl
Size 358.4 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
6158ada15d4eb268e978319fd9223d0e64e5bb30a8f403460a5caaf9535978b6
BLAKE2b-256 checksum
How to use checksums
d9f190448b1281c1cd6eb540b7cf5e19993a30708a81aca5d7b382a246a69db9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp36-cp36m-win_amd64.whl

Download URL sycomore-1.3.2-cp36-cp36m-win_amd64.whl
Size 949.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
3dd511a524db1b0c12e549eca2ead234e06073a2bb74c2a039234734d0790cd2
BLAKE2b-256 checksum
How to use checksums
17a4f79b075900cdc7a60a5c2f6d40a69842a6dd577f227ac1e1a30cdbe058fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl

Download URL sycomore-1.3.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Size 369.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
3fea5609042a6424d2b15eacfe63939e3ed27ed77ef720fddd68b5db9cffe167
BLAKE2b-256 checksum
How to use checksums
a02eacd9a66235d53c03be5208bc7d995b691ff9c116f27501cc751092122859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release files / sycomore-1.3.2-cp36-cp36m-macosx_10_9_x86_64.whl

Download URL sycomore-1.3.2-cp36-cp36m-macosx_10_9_x86_64.whl
Size 358.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9256be1f23e7cd022558dcc344636fc82a3abbdd7e28afa47e33731871896c72
BLAKE2b-256 checksum
How to use checksums
133e6d99b685663d6024d7a4b92758ab1a3ce67e0a58036c0ed48d74f7f46ddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.8

Release history Release notifications | RSS feed

This release

1.3.2 This release

16 release files

1.3.1

13 release files

1.3.0

13 release files

1.2.1

12 release files

1.1.0

13 release files

1.0.0

13 release files

0.6.8

11 release files

0.6.7

15 release files

0.6.6

11 release files

0.6.4

7 release files

0.6.1

9 release files

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page