All Resonint products share a common platform called matipo. Our mission is to make MRI more accessible and, because of this, we have developed this software platform in the open-source Jupyter Lab environment.
Why we use Jupyter Lab:
Easy setup: Since Jupyter Lab can be run from a web browser, you can start using the spectrometer immediately without downloading software.
Flexible: Jupyter Lab can be run from any PC, laptop, or tablet and, because it is web based, the spectrometer can be made accessible from anywhere in the world.
Extendable: Jupyter Lab has an active community of users creating amazing open-source projects that extend the functionality of the Jupyter Lab environment. Click the link to check out some of the cool extensions you can add to your projects: https://github.com/ml-tooling/best-of-jupyter
Dashboards vs. Notebooks
When you load the software webpage for one of our spectrometers, you will see dashboards used for running experiments interactively, and a series of example Jupyter Notebooks.
Dashboards are a simple and accessible way to run standard MRI experiments. They allow you to alter parameters, run standard pulse sequences, and view the results with a few button clicks. This makes them a great tool for calibration, routine imaging, and outreach demonstrations.
Notebooks are a more flexible method of running MRI experiments. They provide a combination of rich text elements, executable code, and inline plot displays. This makes them perfect for creating multi-step experiments, running interactive lab scripts, and developing pulse sequences.
Resources for Getting Started with Jupyter Notebooks
Creating a Python Notebook to run your next MRI experiment is super easy and, to make things even easier, we have compiled a list of resources to help you get started.
1. Setting up a Notebook
The Jupyter Notebook Read the Docs provides a good introduction to setting up notebooks, running cells, and keyboard shortcuts: https://jupyter-notebook.readthedocs.io/en/stable/notebook.html
2. Python and Python Libraries
Our spectrometers are fully programmable using Python 3, which can be run in a Python Notebook.
Pulse sequences are constructed and run using the matipo library, which is documented here: https://resonint-matipo-python.readthedocs-hosted.com/en/latest/usage.html
Other python libraries can be used for data processing, plotting, interactive widgets and more. Some useful libraries, which come preinstalled, are:
numpy: https://numpy.org/doc/stable/
Perform calculations on arrays of data efficiently. Also includes many useful algorithms, e.g. FFT and matrix manipulation.
scipy: https://docs.scipy.org/doc/scipy/
An extensive library of scientific data processing methods.
matplotlib: https://matplotlib.org/stable/users/index
Easy to use plotting library with an API that will be familiar to MATLAB users.
bokeh: https://docs.bokeh.org/en/latest/
Create Beautiful interactive visualizations.
panel: https://panel.holoviz.org/
Build dashboards for experiments with a library of widgets.
ipyvolume: https://ipyvolume.readthedocs.io/en/latest/
Simple 3D volume data visualization.
3. Rich Text Elements
These sections of the Notebook are great for writing educational content, creating lab tasks, noting down your MRI experiment setup, and documenting your code.
Text
This handy markdown guide is great for getting started with text styling: https://www.markdownguide.org/cheat-sheet/
Mathematics
Mathematical notation and equations can be added directly into the markdown cells using LaTeX notation with a single "$...$" for inline notation and a double "$$...$$" for displayed equations.
Example:
In order to efficiently generate the $\vec B_1$ field and pickup the signal from the net magnetization $\vec M$, the coil is combined with a capacitor to form a resonant circuit shown in the figure on the right. The resonant frequency of an LC circuit is:
$$f = \frac{1}{2\pi\sqrt{LC}} \tag{2}$$
Output:
Images and gifs
Although images and gifs can be added using markdown syntax, the styling options are rather limited. Using HTML styling provides greater control over image placement, sizing, and figure captions.
Example:
<figure style="float: right;">
<img src="Images/CapCircuit.png" width="300" style="display: block;">
<center><figcaption style="width: 300px;">Figure 4: Resonant Circuit</figcaption></center>
</figure>
In order to efficiently generate the $\vec B_1$ field and pickup the signal from the net magnetization $\vec M$, the coil is combined with a capacitor to form a resonant circuit shown in the figure on the right. The resonant frequency of an LC circuit is:
$$f = \frac{1}{2\pi\sqrt{LC}} \tag{2}$$
Output:
To learn more about image styling in HTML check out this useful tutorial: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML
Comments