Skip to content

Add GIRF sequence creator with triangles and YAML#68

Open
OErbil wants to merge 2 commits intoPTB-MR:mainfrom
OErbil:OErbil-patch-1
Open

Add GIRF sequence creator with triangles and YAML#68
OErbil wants to merge 2 commits intoPTB-MR:mainfrom
OErbil:OErbil-patch-1

Conversation

@OErbil
Copy link

@OErbil OErbil commented Feb 24, 2026

Files for simple GIRF sequence creation using triangular gradients. The YAML file is used to adjust parameters. The py files reads in the parameters, creates the desired sequence, creates a specifically named folder (named by the user) and saves the sequence and the YAML parameters used into that folder. This way, one never loses the parameters required to recreate the specific sequence. Reconstruction will be added later.

OErbil and others added 2 commits February 23, 2026 13:48
Files for simple GIRF sequence creation using triangular gradients. The YAML file is used to adjust parameters. The py files reads in the parameters, creates the desired sequence, creates a specifically named folder (named by the user) and saves the sequence and the YAML parameters used into that folder. This way, one never loses the parameters required to recreate the specific sequence. Reconstruction will be added later.
@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
/home/runner/.local/lib/python3.12/site-packages/mrseq
   _version.py770%2–9
/home/runner/.local/lib/python3.12/site-packages/mrseq/preparations
   t2_prep.py51198%195
/home/runner/.local/lib/python3.12/site-packages/mrseq/scripts
   radial_flash.py1401192%101, 104, 259, 345, 403–408, 428, 434
   spiral_flash.py1201092%95, 231, 313, 363–368, 387, 393
   t1_inv_rec_gre_single_line.py93990%162, 255, 298–303, 330, 336
   t1_inv_rec_se_single_line.py106992%219, 316, 375–380, 407, 413
   t1_molli_bssfp.py1411391%216, 282–284, 299, 374, 428–433, 454, 460
   t1_t2_spiral_cmrf.py1491292%89, 95, 114, 168, 385, 432–437, 463, 469
   t1rho_se_single_line.py102892%310, 367–372, 399, 405
   t2_multi_echo_se_single_line.py96991%162, 261, 314–319, 344, 350
   t2_t2prep_flash.py1431590%103, 226, 243, 277–279, 291, 367, 429–434, 454, 460
   t2star_multi_echo_flash.py1451490%114, 233, 280–282, 294, 390, 452–457, 477, 483
/home/runner/.local/lib/python3.12/site-packages/mrseq/utils
   ismrmrd.py93298%173, 179
   sequence_helper.py59493%105, 133–134, 162
   trajectory.py149398%45, 87, 354
TOTAL172512793% 

Tests Skipped Failures Errors Time
377 0 💤 0 ❌ 0 🔥 1m 38s ⏱️

@fzimmermann89
Copy link
Member

Some comments as a third party who is not involved in mrseq but keeps an eye on it:

I also appreciate reproducible configuration in general.

But I also enjoy the homogeneity of the different
sequences that Christoph and Patrick came up with in mrseq. If you look a bit around, they follow some patterns. Most importantly, instead of global constants or config files, they whole sequence is a function with arguments.

This has two advantages:
First, you can just use it within python by importing the script and calling if, for example in a loop.
Second, you could combine it with jsonargparse to get the reproducible configuration "for free". Although, I have not tried it in mrseq yet (this is what I use for ML stuff).
You can do jsonargparse.CLI(main) and it will look at the arguments of main and set up argument and yaml parser for it (you can also customize here quite a bit)

Maybe you find the time to match the style of the other sequences AND could try out if jsonargparse helps for the yaml parsing?
Even if you don't use it here, it might still be a useful tool for your own research

Cheers
Felix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants