Hi Resonint Team,
I’ve been getting into making some pulse sequences recently. One thing I thought would be helpful is to make a helper library of gradient shapes (attached) - ramp, trapezoid, triangle, sinusoid.
The issue I am having is that because the pulse sequences are run on a separate runner to what is running the jupyter server, it can’t import my helper library. I could include the code in the pulse sequence file and it would run, but this defeats the object of having a gradient library that I can reuse! Any ideas?
Cheers!
gradients.py (7.9 KB)
1 Like
Hi Aaron,
This is not possible with the current software version because as you have guessed the pulse sequence executor is decoupled and run in a seperate environment.
We will consider how best to allow this in the next update, but for now I have created a zipped folder with an update script that will modify the configuration file so that the pulse sequence runner has access to the lib directory in the top level directory of jupyterlab (i.e. /home/lib), and it is added to the pythonpath.
You can download the zip file here: ilumr-docker-compose-update-20260526.zip
Drag the zip file into the jupyterlab top level directory to copy onto the system, then open a terminal and run these commands to unzip ir:
cd /home
unzip ilumr-docker-compose-update-20260526.zip
Follow the instructions in the README.txt file contained in the unzipped directory.
Finally, create the lib directory manually through the jupyterlab interface and copy your gradients.py file into it. You will be able to load the gradients library inside a pulse sequence using:
import gradients
Let me know if you have any issues!