Evaluating BOLD functional MRI biophysical simulation approaches: Impact of vascular geometry, magnetic field calculations, and water diffusion models.
The 1 match
- [1] § Theory › Diffusion and dephasing calculations › Deterministic diffusion ↔ lessons/Lesson5_BOLDdeterministic.ipynb, lines 56–75 · score 0.50 · modified Bessel function, axis, Gaussian, kernel, pulse, diffusion
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 130 lines · 6 KB · GPL-3.0 · 1 match
- # %% [markdown]
- # # Lesson 5 - BOLDdeterministic
- #
- # The `BOLDdeterministic` module offers a deterministic approach to diffusion modelling. In a complete simulation, it replaces both the `Spins` and `Sequence` objects. To begin we first import the module as follows (and NumPy for array creation, matplotlib for plotting):
- # %%
- from boldswimsuite import BOLDgeometry, BOLDdeterministic
- import numpy as np
- import matplotlib.pyplot as plt
- # %% [markdown]
- # Deterministic diffusion requires a discrete-space voxel. Rather than using Monte Carlo spins to provide the magnetic field offset samples, we use the points on a discrete grid (from the discrete voxel geometry). Unlike spins however, our samples do not diffuse through space over time, they remain on the grid. Instead, the diffusion is modelled by convolving the resulting magnetization (Mx, My) with a special kernel. In essence we are performing a no-diffusion simulation with the gridded samples, and then we apply a post processing step (kernel convolution) on the magnetization to simulate the effects of diffusion. Currently this method is implemented only for 2D geometry, so we will use that in the examples.
- # %% [markdown]
- # To get started, we once again start by creating a randomly generated 2D continuous voxel.
- # %%
- random_continuous_voxel = BOLDgeometry.ContinuousVoxel2D.from_random(
- size=0.2,
- CBV=0.02,
- B0=3,
- labels=['vein', 'artery'],
- weights={
- 'vein':1,
- 'artery':1
- },
- diameter_distributions={
- 'vein': [0.002, 0.003, 0.004],
- 'artery': [0.003, 0.004, 0.005]
- },
- dchis={
- 'vein': 3e-8,
- 'artery': 4e-8
- },
- permeation_probabilities={
- 'vein': 0,
- 'artery': 0
- },
- vessel_type='cylinder',
- allow_vessel_intersection=True,
- seed=0, #repeating with the same seed with provide the same result
- progressbar=True
- )
- print(f'Number of vessels: {len(random_continuous_voxel.vessels)}')
- # %% [markdown]
- # Since deterministic diffusion requires a discrete voxel, we will now convert the continuous voxel to a discrete voxel using the `from_continuous_analytical` alternate constructor of `DiscreteVoxel2D`.
- # %%
- discrete_voxel = BOLDgeometry.DiscreteVoxel2D.from_continuous_analytical(
- N=200,
- voxel=random_continuous_voxel
- )
- # %% [markdown]
- # We now create a `DeterministicDiffuser2D` object. This object replaces both the `Spins` and `Sequence` objects we were previously using. Many of the arguments we have seen before, and they serve the same purpose (i.e. defining the diffusion length and the pulse sequence). There are two new arguments to define for this object.
- # - kernel_type : Literal['ModifiedBessel', 'Gaussian'], the type of convolution kernel to use. Default is 'ModifiedBessel'.
- # - permeable_vessels : bool, if False, will use a correction method to stop diffusion across vessel walls. Otherwise vessels will be permeable. Default is False.
- #
- # The kernel type can remain unchanged, as the modified Bessel function kernel is more accurate. Unlike our simulations with `Spins`, deterministic diffusion does not take in account the permeation probabilities we input in the geometry. This is because vessel permeability has not yet been implemented on a per-vessel basis. We are also unable to assign a probability, we can only choose permeable or impermeable vessels. This is why the `permeable_vessels` argument is necessary, it will therefore overwrite any previously assigned permeation probabilities.
- # %%
- dt=0.2 #we will use a constant 0.2ms time step
- dd2d = BOLDdeterministic.DeterministicDiffuser2D(
- geometry=discrete_voxel,
- pulse_time_indices=[0, 50], #[0ms , 10ms]
- pulse_angles=[np.pi/2, np.pi], #[90 degrees, 180 degrees]
- pulse_axes=[[np.pi/2, np.pi/2], [np.pi/2, 0]], #[y-axis , x-axis]
- ADC=0.001,
- dt=dt,
- kernel_type='ModifiedBessel',
- permeable_vessels=False
- )
- # %% [markdown]
- # We see that the deterministic diffuser prints out the kernel size. This is important as we need the kernel size to be at least larger than 3 (ideally upwards of 10). If the kernel is too small there will be a warning. The kernel size is increased either by increasing `N` during voxel creation, or by increasing the `ADC` (which is not usually desired).
- # %% [markdown]
- # Much like the `Sequence` object, we can now call `step` or `walk` on our `DeterministicDiffuser2D` to advance the simulation and obtain the signals. Here we will just use the `walk` method for convenience.
- # %%
- num_steps = 200 # 200*0.2ms = 40ms
- eviv, ev, iv = dd2d.walk(
- dt=dt,
- num_steps=num_steps,
- progressbar=True
- )
- # %% [markdown]
- # Now we can plot the signals using matplotlib.
- # %%
- # array of the time range
- time_range = np.arange(0, dt*num_steps, dt)
- # creating a matplotlib figure
- figure, (ax1,ax2,ax3) = plt.subplots(nrows=1, ncols=3, figsize=(15,5))
- # plotting all three signals with some formatting
- ax1.plot(time_range, eviv)
- ax1.set_title('Total')
- ax1.set_xlabel('Time (ms)')
- ax1.set_ylabel('Signal')
- ax2.plot(time_range, ev)
- ax2.set_title('EV')
- ax2.set_xlabel('Time (ms)')
- ax3.plot(time_range, iv)
- ax3.set_title('IV')
- ax3.set_xlabel('Time (ms)')
- figure.tight_layout()
- # %% [markdown]
- # This completes the basic lessons for BOLDswimsuite! There are some example scripts of common simulations in the examples folder which can be used as reference:
- # - `3D-ANA-MC_script.py`: Monte Carlo diffusion simulation of a randomly generated 3D continuous voxel.
- #
- # - `3D-ANA-MC-G_script.py`: Monte Carlo diffusion simulation of a randomly generated 3D discrete voxel with analytical offset calculation.
- #
- # - `3D-FFT-MC_script.py`: Monte Carlo diffusion simulation of a randomly generated 3D discrete voxel with FFT offset calculation.
- #
- # - `2D-ANA-DD_script.py`: deterministic diffusion simulation of a randomly generated 2D discrete voxel.
- #
- # - `2D-ANA-MC_script.py`: Monte Carlo diffusion simulation of a randomly generated 2D continuous voxel.
- #
- # - `2D-ANA-MC-G_script.py`: Monte Carlo diffusion simulation of a randomly generated 2D discrete voxel with analytical offset calculation.
Lesson5_BOLDdeterministic.ipynb at commit 82d7267, under GPL-3.0 · at the source
Overview
- Department of Physics, Carleton University, Ottawa, ON, Canada
- University of Ottawa Institute of Mental Health Research at The Royal, Ottawa, ON, Canada
- Rotman Research Institute, Baycrest Health Sciences, North York, ON, Canada
- Department of Chemistry, University of Waterloo, Waterloo, ON, Canada
- Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General Hospital, Charlestown, MA, United States
- Department of Radiology, Harvard Medical School, Boston, MA, United States
- Institute for Mechanics, Computational Mechanics Group, Technical University of Darmstadt, Darmstadt, Germany
- Harvard-MIT Program in Health Sciences and Technology, Massachusetts Institute of Technology, Cambridge, MA, United States
- Department of Medical Biophysics, University of Toronto, Toronto, ON, Canada
Abstract
Biophysical simulations have guided the development of blood oxygenation level-dependent (BOLD) functional MRI (fMRI) acquisitions and signal models that relate the BOLD signal to the underlying physiology, such as calibrated BOLD and vascular fingerprinting. Numerous simulation techniques have been developed, however, few of them have been directly compared, thus limiting the assessment of the accuracy and interchangeability of these methods as well as the accuracy of the quantitative techniques derived from them. In this work, we compared the accuracy and computational demands of eight previously published simulation approaches that adopt different geometries (ranging from infinite cylinders to synthetic vascular anatomical networks (VANs)), field offset calculations (analytical and Fourier-based), and water diffusion implementations (Monte Carlo and convolution-based), all of which are available in an open-source Python toolkit, BOLDsωimsuite. The reference simulation approach for comparison used three-dimensional infinite cylinders, analytical field offsets, and Monte Carlo diffusion. When compared with the reference approach, most of the simulations, including two- and three-dimensional geometries, were in excellent agreement when assuming the intravascular signal contribution was small. Two commonly employed simulation approaches were notably biased; both used two-dimensional geometries with overly simplified vasculature or field offset calculations. In general, the simulated intravascular signal was the least consistent across approaches, thus potentially resulting in larger errors when the intravascular signal contribution is large. Lastly, the VAN results were in good agreement with the reference but they diverged slightly, yet systematically, from each other at smaller radii (≲3 μm), primarily driven by intravascular signal differences. We conclude, therefore, that the reference approach is an attractive option for exploratory simulations in the many cases where anatomical and haemodynamic realism is not needed, balancing ease of implementation, accessibility, versatility, computational efficiency, accuracy of results, and interpretability. These findings help pave the way for a broader adoption of forward modelling of the BOLD signal and more reliable interpretations of biophysical simulations aiming to develop quantitative models of the BOLD signal.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.
jacobchausse/BOLDswimsuite
82d72678eea8c135c03372b772c9bf0eadea9617, 13 June 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
20 files
- examples/
2D-ANA-DD_script.py , Python, 68 lines - examples/
2D-ANA-MC-G-MW_script.py , Python, 176 lines - examples/
2D-ANA-MC-G_script.py , Python, 73 lines - examples/
2D-ANA-MC_script.py , Python, 68 lines - examples/
3D-ANA-MC-G_script.py , Python, 71 lines - examples/
3D-ANA-MC_script.py , Python, 66 lines - examples/
3D-FFT-MC_script.py , Python, 73 lines - examples/
saveload_ContinuousVoxel , Python, 80 lines2D.py - examples/
saveload_ContinuousVoxel , Python, 80 lines3D.py - examples/
saveload_DiscreteVoxel2D , Python, 86 lines.py - examples/
saveload_DiscreteVoxel3D , Python, 86 lines.py - lessons/
Lesson0_JupyterNotebooks , Jupyter, 40 lines.ipynb - lessons/
Lesson1_BOLDvessel.ipynb , Jupyter, 166 lines - lessons/
Lesson2_BOLDgeometry.ipy , Jupyter, 314 linesnb - lessons/
Lesson3_BOLDspins.ipynb , Jupyter, 136 lines - lessons/
Lesson4_BOLDsequence.ipy , Jupyter, 271 linesnb - lessons/
Lesson5_BOLDdeterministi , Jupyter, 130 lines, 1 matchc.ipynb - lessons/
Lesson6_AdvancedExamples , Jupyter, 471 lines.ipynb - COPYING, License, 674 lines
- README.md, Text, 44 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 18 scripts, each with its path and the digest of its content;
- 1 match between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data and Code Availability
The BOLDsωimsuite simulation toolkit is openly available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 5 authors, 6 keywords, 5 funders, 69 references.
Cite
This paper
Berman, A. J., Chaussé, J., Hartung, G., Polimeni, J. R., & Chen, J. J. (2026). Evaluating BOLD functional MRI biophysical simulation approaches: Impact of vascular geometry, magnetic field calculations, and water diffusion models. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1247. https://
BibTeX
@article{berman2026evalu
author = {Berman, Avery J.L. and Chaussé, Jacob and Hartung, Grant and Polimeni, Jonathan R. and Chen, J. Jean},
title = {{Evaluating BOLD functional MRI biophysical simulation approaches: Impact of vascular geometry, magnetic field calculations, and water diffusion models}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = may,
volume = {4},
pages = {IMAG.a.1247},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/
url = {https://
pmid = {42212230},
pmcid = {PMC13214576}
}
RIS
TY - JOUR
AU - Berman, Avery J.L.
AU - Chaussé, Jacob
AU - Hartung, Grant
AU - Polimeni, Jonathan R.
AU - Chen, J. Jean
TI - Evaluating BOLD functional MRI biophysical simulation approaches: Impact of vascular geometry, magnetic field calculations, and water diffusion models
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/
VL - 4
SP - IMAG.a.1247
SN - 2837-6056
PB - MIT Press
DO - 10.1162/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1162/
"type": "article-journal",
"title": "Evaluating BOLD functional MRI biophysical simulation approaches: Impact of vascular geometry, magnetic field calculations, and water diffusion models",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Berman",
"given": "Avery J.L."
},
{
"family": "Chaussé",
"given": "Jacob"
},
{
"family": "Hartung",
"given": "Grant"
},
{
"family": "Polimeni",
"given": "Jonathan R."
},
{
"family": "Chen",
"given": "J. Jean"
}
],
"container-title-short":
"volume": "4",
"page": "IMAG.a.1247",
"DOI": "10.1162/
"PMID": "42212230",
"PMCID": "PMC13214576",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
26
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1162/imag.a.1340
- Biophysical simulations of fMRI responses using realistic microvascular models: Insights into distinct hemodynamics in humans and mice.Journal: Imaging neuroscience (Cambridge, Mass.)In common: computational, fMRI, 20 references
- [2] doi:10.1371/journal.pcbi.1014576 [code]
- A synthetic 3D human cerebrovascular model informed by histology for simulating the cortical depth-dependent BOLD fMRI signal.Journal: PLoS computational biologyIn common: computational, fMRI, 16 references
- [3] doi:10.7554/elife.92805 [code]
- Brain-wide mapping of layer-specific functional connectivity in the human cortex at 3T using draining-vein-suppressed
fMRI. Journal: eLifeIn common: fMRI, 8 references - [4] doi:10.1162/imag.a.1279 [code]
- Multimodal laminar characterization of visual areas along the cortical hierarchy.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Matplotlib, NumPy, 4 references
- [5] doi:10.1002/mrm.70468 [code]
- A Realistic In Silico Brain Phantom for Quantifying Susceptibility Anisotropy-Induced Error in Susceptibility Separation.Journal: Magnetic resonance in medicineIn common: Matplotlib, NumPy, computational, 2 references
- [6] doi:10.1002/nbm.70231
- Complementarity of BOLD and ADC-fMRI in Mapping Brain Visual Processing in the Rat.Journal: NMR in biomedicineIn common: fMRI, 3 references
- [7] doi:10.1038/s41598-026-58377-2 [code]
- A novel distortion-matched anatomical imaging sequence for high-fidelity functional mapping in submillimeter-resolution
fMRI. Journal: Scientific reportsIn common: fMRI, 3 references - [8] doi:10.1002/mrm.70433 [code]
- Single-Shot 2D Radial Echo Planar Imaging for Functional MRI.Journal: Magnetic resonance in medicineIn common: fMRI, 3 references
- [9] doi:10.1038/s41592-026-03154-2 [code]
- Simultaneous single-cell calcium imaging of neuronal population activity and brain-wide BOLD fMRI.Journal: Nature methodsIn common: Matplotlib, NumPy, fMRI, 2 references
- [10] doi:10.1162/netn.a.570 [code]
- Higher-order statistics for constructing centered edge functional connectivity.Journal: Network neuroscience (Cambridge, Mass.)In common: Matplotlib, NumPy, fMRI, 2 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 18 scripts, and 1 match between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:c0acf80e0fe05bd2…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
