mrzerocore 0.3.1__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. mrzerocore-0.4.2/.github/workflows/deploy_docs.yml +38 -0
  2. mrzerocore-0.4.2/.github/workflows/playground_test.yml +64 -0
  3. mrzerocore-0.4.2/.github/workflows/pypi_publish.yml +148 -0
  4. mrzerocore-0.4.2/.github/workflows/simulation_test.yml +78 -0
  5. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/.gitignore +13 -3
  6. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/CHANGELOG.md +41 -0
  7. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/Cargo.lock +2 -2
  8. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/Cargo.toml +3 -1
  9. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/PKG-INFO +47 -14
  10. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/README.md +34 -4
  11. mrzerocore-0.4.2/documentation/book.toml +12 -0
  12. mrzerocore-0.4.2/documentation/playground_mr0/Pulseq_zero_FLASH_FAopt_PSFtask.ipynb +510 -0
  13. mrzerocore-0.4.2/documentation/playground_mr0/Pulseq_zero_TSE_FAopt_SARtask.ipynb +962 -0
  14. mrzerocore-0.4.2/documentation/playground_mr0/flash.ipynb +239 -0
  15. {MRzeroCore-0.3.1/documentation/playground_mr0 → mrzerocore-0.4.2/documentation/playground_mr0/legacy_seqs}/flash_DWI.ipynb +2 -7
  16. mrzerocore-0.4.2/documentation/playground_mr0/legacy_seqs/mr0_spiral_GRE.ipynb +495 -0
  17. mrzerocore-0.4.2/documentation/playground_mr0/mr00_FLASH_2D_ernstAngle_opt.ipynb +495 -0
  18. mrzerocore-0.4.2/documentation/playground_mr0/mr0_DREAM_STE_seq.ipynb +1030 -0
  19. mrzerocore-0.4.2/documentation/playground_mr0/mr0_DREAM_STID_seq.ipynb +898 -0
  20. mrzerocore-0.4.2/documentation/playground_mr0/mr0_DWI_SE_EPI.ipynb +452 -0
  21. mrzerocore-0.4.2/documentation/playground_mr0/mr0_EPI_2D_seq.ipynb +610 -0
  22. mrzerocore-0.4.2/documentation/playground_mr0/mr0_FID_seq.ipynb +309 -0
  23. mrzerocore-0.4.2/documentation/playground_mr0/mr0_FLASH_2D_seq.ipynb +696 -0
  24. mrzerocore-0.4.2/documentation/playground_mr0/mr0_GRE_to_FLASH.ipynb +397 -0
  25. mrzerocore-0.4.2/documentation/playground_mr0/mr0_RARE_2D_seq.ipynb +378 -0
  26. mrzerocore-0.4.2/documentation/playground_mr0/mr0_RARE_2D_seq_multi_shot.ipynb +255 -0
  27. mrzerocore-0.4.2/documentation/playground_mr0/mr0_SE_CPMG_seq.ipynb +354 -0
  28. mrzerocore-0.4.2/documentation/playground_mr0/mr0_STE_3pulses_5echoes_seq.ipynb +374 -0
  29. mrzerocore-0.4.2/documentation/playground_mr0/mr0_TSE_2D_multi_shot_seq.ipynb +431 -0
  30. mrzerocore-0.4.2/documentation/playground_mr0/mr0_bSSFP_2D_seq.ipynb +765 -0
  31. mrzerocore-0.4.2/documentation/playground_mr0/mr0_diffusion_prep_STEAM_2D_seq.ipynb +718 -0
  32. mrzerocore-0.4.2/documentation/playground_mr0/mr0_opt_FLASH_2D_IR_Fit_T1.ipynb +495 -0
  33. mrzerocore-0.4.2/documentation/playground_mr0/mr0_opt_FLASH_2D_IR_voxelNN_T1.ipynb +612 -0
  34. mrzerocore-0.4.2/documentation/playground_mr0/mr0_pypulseq_exmpls_seq.ipynb +215 -0
  35. mrzerocore-0.4.2/documentation/playground_mr0/mr0_upload_seq.ipynb +273 -0
  36. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/pulseq_flash.ipynb +13 -1
  37. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/pulseq_rf_shim.ipynb +25 -3
  38. mrzerocore-0.4.2/documentation/playground_mr0/pulseq_sim_pTx.ipynb +190 -0
  39. mrzerocore-0.4.2/documentation/playground_mr0/pulseq_zero_DESC_demo.ipynb +451 -0
  40. mrzerocore-0.4.2/documentation/playground_mr0/reference_bssfp_data_feb2025.npz +0 -0
  41. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/Pulseq_2D_density_adapted_radial.ipynb +485 -0
  42. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/gpt4mr.ipynb +426 -0
  43. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/improved_mr0_RARE_2D_seq.ipynb +277 -0
  44. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/improved_mr0_RARE_2D_seq_nonsel.ipynb +307 -0
  45. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/mr0_EPI_2D_with_ORC_seq.ipynb +914 -0
  46. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/mr0_burst_TSE.ipynb +282 -0
  47. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/mr0_spiral_GRE.ipynb +388 -0
  48. mrzerocore-0.4.2/documentation/playground_mr0/unsorted/numerical_brain_cropped.mat +0 -0
  49. mrzerocore-0.4.2/documentation/src/README.md +56 -0
  50. mrzerocore-0.4.2/documentation/src/SUMMARY.md +38 -0
  51. mrzerocore-0.4.2/documentation/src/api-nifti.md +132 -0
  52. mrzerocore-0.4.2/documentation/src/api-phantom.md +128 -0
  53. mrzerocore-0.4.2/documentation/src/api-reconstruction.md +37 -0
  54. mrzerocore-0.4.2/documentation/src/api-sequence.md +150 -0
  55. mrzerocore-0.4.2/documentation/src/api-simulation.md +166 -0
  56. mrzerocore-0.4.2/documentation/src/api-unsorted.md +51 -0
  57. mrzerocore-0.4.2/documentation/src/api-util.md +154 -0
  58. mrzerocore-0.4.2/documentation/src/api.md +50 -0
  59. mrzerocore-0.4.2/documentation/src/faq.md +201 -0
  60. mrzerocore-0.4.2/documentation/src/integration-matlab.md +44 -0
  61. mrzerocore-0.4.2/documentation/src/integration-pulseq.md +129 -0
  62. mrzerocore-0.4.2/documentation/src/integration-pulseqzero.md +1 -0
  63. mrzerocore-0.4.2/documentation/src/integration.md +5 -0
  64. mrzerocore-0.4.2/documentation/src/literature.md +140 -0
  65. mrzerocore-0.4.2/documentation/src/nifti-coords.md +86 -0
  66. mrzerocore-0.4.2/documentation/src/nifti-generate.md +152 -0
  67. mrzerocore-0.4.2/documentation/src/nifti-spec.md +145 -0
  68. mrzerocore-0.4.2/documentation/src/nifti.md +13 -0
  69. mrzerocore-0.4.2/documentation/src/playground.md +76 -0
  70. mrzerocore-0.4.2/documentation/src/state_selection.md +40 -0
  71. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/pyproject.toml +11 -7
  72. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/__init__.py +3 -0
  73. mrzerocore-0.4.2/python/MRzeroCore/phantom/brainweb/.gitignore +1 -0
  74. mrzerocore-0.4.2/python/MRzeroCore/phantom/brainweb/__init__.py +192 -0
  75. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/phantom/brainweb/brainweb_data.json +39 -40
  76. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/phantom/custom_voxel_phantom.py +19 -46
  77. mrzerocore-0.4.2/python/MRzeroCore/phantom/nifti_phantom.py +210 -0
  78. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/phantom/sim_data.py +14 -4
  79. mrzerocore-0.4.2/python/MRzeroCore/phantom/tissue_dict.py +269 -0
  80. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/phantom/voxel_grid_phantom.py +139 -38
  81. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/sequence.py +27 -6
  82. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/simulation/isochromat_sim.py +6 -6
  83. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/simulation/main_pass.py +43 -49
  84. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/simulation/pre_pass.py +45 -12
  85. mrzerocore-0.4.2/python/MRzeroCore/simulation/sig_to_mrd.py +362 -0
  86. mrzerocore-0.4.2/python/MRzeroCore/util.py +884 -0
  87. mrzerocore-0.4.2/tests/README.md +88 -0
  88. mrzerocore-0.4.2/tests/__init__.py +0 -0
  89. mrzerocore-0.4.2/tests/playground_test.py +44 -0
  90. mrzerocore-0.4.2/tests/simulation_test/config.py +29 -0
  91. mrzerocore-0.4.2/tests/simulation_test/generate_actual_files.py +6 -0
  92. mrzerocore-0.4.2/tests/simulation_test/generate_files.py +83 -0
  93. mrzerocore-0.4.2/tests/simulation_test/generate_ref_files.py +6 -0
  94. mrzerocore-0.4.2/tests/simulation_test/generate_seq_files.py +107 -0
  95. mrzerocore-0.4.2/tests/simulation_test/test_simulation.ps1 +120 -0
  96. mrzerocore-0.4.2/tests/simulation_test/test_simulation.py +75 -0
  97. mrzerocore-0.4.2/tests/utils.py +120 -0
  98. MRzeroCore-0.3.1/.github/workflows/pypi_publish.yml +0 -120
  99. MRzeroCore-0.3.1/.readthedocs.yaml +0 -20
  100. MRzeroCore-0.3.1/documentation/_config.yml +0 -42
  101. MRzeroCore-0.3.1/documentation/_toc.yml +0 -47
  102. MRzeroCore-0.3.1/documentation/api/phantom.md +0 -85
  103. MRzeroCore-0.3.1/documentation/api/reco.md +0 -34
  104. MRzeroCore-0.3.1/documentation/api/sequence.md +0 -88
  105. MRzeroCore-0.3.1/documentation/api/simulation/isochromat_sim.md +0 -38
  106. MRzeroCore-0.3.1/documentation/api/simulation/pdg_sim.md +0 -70
  107. MRzeroCore-0.3.1/documentation/api/simulation.md +0 -22
  108. MRzeroCore-0.3.1/documentation/api/util.md +0 -15
  109. MRzeroCore-0.3.1/documentation/api.md +0 -48
  110. MRzeroCore-0.3.1/documentation/intro.md +0 -38
  111. MRzeroCore-0.3.1/documentation/phantom_generation.md +0 -21
  112. MRzeroCore-0.3.1/documentation/playground/generated/seqs/FLASH.ipynb +0 -1
  113. MRzeroCore-0.3.1/documentation/playground/quantified_brain.npz +0 -0
  114. MRzeroCore-0.3.1/documentation/playground/templates/generate.py +0 -82
  115. MRzeroCore-0.3.1/documentation/playground/templates/seqs.ipynb +0 -119
  116. MRzeroCore-0.3.1/documentation/playground/templates/template_A.ipynb +0 -396
  117. MRzeroCore-0.3.1/documentation/playground_mr0/flash.ipynb +0 -292
  118. MRzeroCore-0.3.1/documentation/playground_mr0/mr00_FLASH_2D_ernstAngle_opt.ipynb +0 -1
  119. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_DREAM_STE_seq.ipynb +0 -610
  120. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_DREAM_STID_seq.ipynb +0 -557
  121. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_EPI_2D_seq.ipynb +0 -1
  122. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_FID_seq.ipynb +0 -1
  123. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_FLASH_2D_seq.ipynb +0 -1
  124. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_GRE_to_FLASH.ipynb +0 -1
  125. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_RARE_2D_seq.ipynb +0 -1
  126. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_SE_CPMG_seq.ipynb +0 -1
  127. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_STE_3pulses_5echoes_seq.ipynb +0 -1
  128. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_bSSFP_2D_seq.ipynb +0 -1
  129. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_burst_TSE.ipynb +0 -288
  130. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_opt_FLASH_2D_IR_Fit_T1.ipynb +0 -1
  131. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_opt_FLASH_2D_IR_voxelNN_T1.ipynb +0 -1
  132. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_pypulseq_exmpls_seq.ipynb +0 -1
  133. MRzeroCore-0.3.1/documentation/playground_mr0/mr0_upload_seq.ipynb +0 -1
  134. MRzeroCore-0.3.1/documentation/playground_mr0/overview.md +0 -82
  135. MRzeroCore-0.3.1/documentation/playground_mr0/pulseq_sim_pTx.ipynb +0 -171
  136. MRzeroCore-0.3.1/documentation/requirements.txt +0 -8
  137. MRzeroCore-0.3.1/python/MRzeroCore/phantom/brainweb/__init__.py +0 -171
  138. MRzeroCore-0.3.1/python/MRzeroCore/util.py +0 -344
  139. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/EULA.txt +0 -0
  140. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/LICENSE +0 -0
  141. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/AdjDataUser2gB0_transversal_0.08moving_average.mat +0 -0
  142. {MRzeroCore-0.3.1/documentation/playground_mr0 → mrzerocore-0.4.2/documentation/playground_mr0/legacy_seqs}/mr0_CS_cartesian_seq.ipynb +0 -0
  143. {MRzeroCore-0.3.1/documentation/playground_mr0 → mrzerocore-0.4.2/documentation/playground_mr0/legacy_seqs}/mr0_CS_radial_seq.ipynb +0 -0
  144. {MRzeroCore-0.3.1/documentation/playground_mr0 → mrzerocore-0.4.2/documentation/playground_mr0/legacy_seqs}/mr0_DWI_GRE_2D_seq.ipynb +0 -0
  145. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/numerical_brain_cropped.mat +0 -0
  146. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/ptx_phantom.p +0 -0
  147. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/seqs/flash pTx CP.seq +0 -0
  148. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/seqs/flash pTx EP.seq +0 -0
  149. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/seqs/flash pTx QM.seq +0 -0
  150. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/documentation/playground_mr0/subject05.npz +0 -0
  151. {MRzeroCore-0.3.1/documentation → mrzerocore-0.4.2/documentation/src}/logo.png +0 -0
  152. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/phantom/brainweb/brainweb_data_sources.txt +0 -0
  153. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/phantom/brainweb/output/.gitkeep +0 -0
  154. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/exporter.py +0 -0
  155. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/exporter_v2.py +0 -0
  156. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/helpers.py +0 -0
  157. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_exporter.py +0 -0
  158. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/__init__.py +0 -0
  159. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/adc.py +0 -0
  160. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/helpers.py +0 -0
  161. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulse.py +0 -0
  162. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/__init__.py +0 -0
  163. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/adc.py +0 -0
  164. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/block.py +0 -0
  165. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/definitons.py +0 -0
  166. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/gradient.py +0 -0
  167. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/helpers.py +0 -0
  168. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/rf.py +0 -0
  169. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/trap.py +0 -0
  170. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/pulseq/pulseq_loader/spoiler.py +0 -0
  171. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/python/MRzeroCore/reconstruction.py +0 -0
  172. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/src/lib.rs +0 -0
  173. {MRzeroCore-0.3.1 → mrzerocore-0.4.2}/src/pre_pass.rs +0 -0
@@ -0,0 +1,38 @@
1
+ name: Deploy
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write # To push a branch
12
+ pages: write # To push to a GitHub Pages site
13
+ id-token: write # To update the deployment status
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+ - name: Install latest mdbook
19
+ run: |
20
+ tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
21
+ url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
22
+ mkdir mdbook
23
+ curl -sSL $url | tar -xz --directory=./mdbook
24
+ echo `pwd`/mdbook >> $GITHUB_PATH
25
+ - name: Build Book
26
+ run: |
27
+ cd documentation
28
+ mdbook build
29
+ - name: Setup Pages
30
+ uses: actions/configure-pages@v4
31
+ - name: Upload artifact
32
+ uses: actions/upload-pages-artifact@v3
33
+ with:
34
+ # Upload entire repository
35
+ path: 'documentation/book'
36
+ - name: Deploy to GitHub Pages
37
+ id: deployment
38
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,64 @@
1
+ name: Playground Notebooks Test
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+ schedule:
8
+ # Run once a week on Sunday at 00:00 UTC
9
+ - cron: '0 0 * * 0'
10
+
11
+ jobs:
12
+ generate-matrix:
13
+ runs-on: ubuntu-latest
14
+ outputs:
15
+ notebook-matrix: ${{ steps.set-matrix.outputs.matrix }}
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: List all notebooks
19
+ id: set-matrix
20
+ run: |
21
+ NOTEBOOKS=$(printf '%s\n' \
22
+ documentation/playground_mr0/mr0_FID_seq.ipynb \
23
+ documentation/playground_mr0/mr0_SE_CPMG_seq.ipynb \
24
+ documentation/playground_mr0/mr0_STE_3pulses_5echoes_seq.ipynb \
25
+ documentation/playground_mr0/mr0_FLASH_2D_seq.ipynb \
26
+ documentation/playground_mr0/mr0_EPI_2D_seq.ipynb \
27
+ documentation/playground_mr0/mr0_DWI_SE_EPI.ipynb \
28
+ documentation/playground_mr0/mr0_diffusion_prep_STEAM_2D_seq.ipynb \
29
+ documentation/playground_mr0/mr0_RARE_2D_seq.ipynb \
30
+ documentation/playground_mr0/mr0_TSE_2D_multi_shot_seq.ipynb \
31
+ documentation/playground_mr0/mr0_GRE_to_FLASH.ipynb \
32
+ documentation/playground_mr0/mr0_bSSFP_2D_seq.ipynb \
33
+ documentation/playground_mr0/mr0_DREAM_STE_seq.ipynb \
34
+ | jq -R -s -c 'split("\n")[:-1]')
35
+ echo "matrix=$NOTEBOOKS" >> $GITHUB_OUTPUT
36
+
37
+ test-notebooks:
38
+ needs: generate-matrix
39
+ runs-on: ubuntu-latest
40
+ strategy:
41
+ fail-fast: false
42
+ matrix:
43
+ notebook: ${{fromJSON(needs.generate-matrix.outputs.notebook-matrix)}}
44
+
45
+ steps:
46
+ - uses: actions/checkout@v3
47
+
48
+ - name: Set up Python
49
+ uses: actions/setup-python@v4
50
+ with:
51
+ python-version: "3.12"
52
+
53
+ - name: Install dependencies
54
+ run: |
55
+ pip install pypulseq &> /dev/null
56
+ pip install pydisseqt
57
+ pip install MRzeroCore --no-deps
58
+ pip install ismrmrd
59
+ pip install torchkbnufft PyWavelets tqdm scikit-image
60
+ wget https://github.com/MRsources/MRzero-Core/raw/main/documentation/playground_mr0/numerical_brain_cropped.mat &> /dev/null
61
+ pip install jupyter nbconvert
62
+ - run: |
63
+ echo "🧪 Testing ${{ matrix.notebook }}..."
64
+ python tests/playground_test.py ${{ matrix.notebook }}
@@ -0,0 +1,148 @@
1
+ # This file is a modified version of:
2
+ #
3
+ # maturin generate-ci github -o .github/workflows/pypi_publish.yml
4
+ #
5
+ name: CI
6
+
7
+ on:
8
+ push:
9
+ branches:
10
+ - main
11
+ pull_request:
12
+ branches:
13
+ - main
14
+ workflow_dispatch:
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ linux:
21
+ runs-on: ${{ matrix.platform.runner }}
22
+ strategy:
23
+ matrix:
24
+ platform:
25
+ - runner: ubuntu-22.04
26
+ target: x86_64
27
+ - runner: ubuntu-22.04
28
+ target: x86
29
+ - runner: ubuntu-22.04
30
+ target: aarch64
31
+ - runner: ubuntu-22.04
32
+ target: armv7
33
+ - runner: ubuntu-22.04
34
+ target: s390x
35
+ - runner: ubuntu-22.04
36
+ target: ppc64le
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: actions/setup-python@v5
40
+ with:
41
+ python-version: 3.x
42
+ - name: Build wheels
43
+ uses: PyO3/maturin-action@v1
44
+ with:
45
+ target: ${{ matrix.platform.target }}
46
+ args: --release --out dist
47
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
48
+ manylinux: auto
49
+ - name: Upload wheels
50
+ uses: actions/upload-artifact@v4
51
+ with:
52
+ name: wheels-linux-${{ matrix.platform.target }}
53
+ path: dist
54
+
55
+ windows:
56
+ runs-on: ${{ matrix.platform.runner }}
57
+ strategy:
58
+ matrix:
59
+ platform:
60
+ - runner: windows-latest
61
+ target: x64
62
+ # - runner: windows-latest
63
+ # target: x86
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - uses: actions/setup-python@v5
67
+ with:
68
+ python-version: 3.x
69
+ architecture: ${{ matrix.platform.target }}
70
+ - name: Build wheels
71
+ uses: PyO3/maturin-action@v1
72
+ with:
73
+ target: ${{ matrix.platform.target }}
74
+ args: --release --out dist
75
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
76
+ - name: Upload wheels
77
+ uses: actions/upload-artifact@v4
78
+ with:
79
+ name: wheels-windows-${{ matrix.platform.target }}
80
+ path: dist
81
+
82
+ macos:
83
+ runs-on: ${{ matrix.platform.runner }}
84
+ strategy:
85
+ matrix:
86
+ platform:
87
+ # - runner: macos-13
88
+ # target: x86_64
89
+ - runner: macos-14
90
+ target: aarch64
91
+ steps:
92
+ - uses: actions/checkout@v4
93
+ - uses: actions/setup-python@v5
94
+ with:
95
+ python-version: 3.x
96
+ - name: Build wheels
97
+ uses: PyO3/maturin-action@v1
98
+ with:
99
+ target: ${{ matrix.platform.target }}
100
+ args: --release --out dist
101
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
102
+ - name: Upload wheels
103
+ uses: actions/upload-artifact@v4
104
+ with:
105
+ name: wheels-macos-${{ matrix.platform.target }}
106
+ path: dist
107
+
108
+ sdist:
109
+ runs-on: ubuntu-latest
110
+ steps:
111
+ - uses: actions/checkout@v4
112
+ - name: Build sdist
113
+ uses: PyO3/maturin-action@v1
114
+ with:
115
+ command: sdist
116
+ args: --out dist
117
+ - name: Upload sdist
118
+ uses: actions/upload-artifact@v4
119
+ with:
120
+ name: wheels-sdist
121
+ path: dist
122
+
123
+ release:
124
+ name: Release
125
+ runs-on: ubuntu-latest
126
+ # if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
127
+ needs: [linux, windows, macos, sdist]
128
+ permissions:
129
+ # Use to sign the release artifacts
130
+ id-token: write
131
+ # Used to upload release artifacts
132
+ contents: write
133
+ # Used to generate artifact attestation
134
+ attestations: write
135
+ steps:
136
+ - uses: actions/download-artifact@v4
137
+ - name: Generate artifact attestation
138
+ uses: actions/attest-build-provenance@v2
139
+ with:
140
+ subject-path: 'wheels-*/*'
141
+ - name: Publish to PyPI
142
+ # if: ${{ startsWith(github.ref, 'refs/tags/') }}
143
+ uses: PyO3/maturin-action@v1
144
+ env:
145
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
146
+ with:
147
+ command: upload
148
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,78 @@
1
+ name: Simulation Test
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+ generate-matrix:
9
+ runs-on: ubuntu-latest
10
+ outputs:
11
+ notebook-matrix: ${{ steps.set-matrix.outputs.matrix }}
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - name: List all notebooks
15
+ id: set-matrix
16
+ run: |
17
+ python -c "
18
+ import sys
19
+ sys.path.append('tests/simulation_test')
20
+ from config import NOTEBOOKS_TO_TEST
21
+ import json
22
+ print(json.dumps(NOTEBOOKS_TO_TEST))
23
+ " > notebooks.json
24
+ echo "matrix=$(cat notebooks.json)" >> $GITHUB_OUTPUT
25
+
26
+ test-notebooks:
27
+ needs: generate-matrix
28
+ runs-on: ubuntu-latest
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ notebook: ${{fromJSON(needs.generate-matrix.outputs.notebook-matrix)}}
33
+
34
+ steps:
35
+ - uses: actions/checkout@v3
36
+
37
+ - name: Set up Python
38
+ uses: actions/setup-python@v4
39
+ with:
40
+ python-version: "3.12"
41
+
42
+ - name: Install dependencies
43
+ run: |
44
+ pip install pypulseq
45
+ pip install torchkbnufft
46
+ pip install nbformat
47
+
48
+ - name: Generate sequence file
49
+ run: |
50
+ mkdir tests/simulation_test/seq_files
51
+ python tests/simulation_test/generate_seq_files.py ${{ matrix.notebook }}
52
+
53
+ - name: Cloning main branch
54
+ run: |
55
+ git clone https://github.com/MRsources/MRzero-Core.git main_branch
56
+ mkdir tests/simulation_test/ref_files
57
+
58
+ - name: Installing main branch version
59
+ run: |
60
+ pip install -e ./main_branch
61
+
62
+ - name: Generate reference files
63
+ run: |
64
+ python tests/simulation_test/generate_ref_files.py
65
+
66
+ - name: Uninstall main branch version and install current version
67
+ run: |
68
+ pip uninstall -y MRzeroCore
69
+ pip install -e .
70
+
71
+ - name: Generate actual files
72
+ run: |
73
+ mkdir tests/simulation_test/actual_files
74
+ python tests/simulation_test/generate_actual_files.py
75
+
76
+ - name: Run Simulation Test
77
+ run: |
78
+ python tests/simulation_test/test_simulation.py
@@ -1,9 +1,9 @@
1
1
  /target
2
- /documentation/_autosummary
3
- /documentation/_build
2
+ /documentation/book
4
3
  out/
5
4
  *.seq
6
5
  *.env
6
+ *.ipynb_checkpoints
7
7
 
8
8
  *.pdf
9
9
 
@@ -13,6 +13,7 @@ external.seq
13
13
 
14
14
  # Brainweb files
15
15
  *.i8.gz
16
+ *.npz
16
17
 
17
18
  # Byte-compiled / optimized / DLL files
18
19
  __pycache__/
@@ -83,4 +84,13 @@ docs/_build/
83
84
  .vscode/
84
85
 
85
86
  # Pyenv
86
- .python-version
87
+ .python-version
88
+
89
+ # keep test seq files
90
+ !tests/simulation_test/seq_files/*.seq
91
+
92
+ # cursor files
93
+ .cursor/
94
+
95
+ # test venv
96
+ .test_venv/
@@ -1,3 +1,44 @@
1
+ - 0.4.0
2
+ - Integrate ISMRMD exporter
3
+ - Update documentation
4
+ - Provide option to get PDG graph plotting data without plotting
5
+ - Helper plotting function that works with all pulseq versions
6
+ - 0.3.13
7
+ - bugfix: util.load_phantom - B0_polynomial computation used wrong number of dims
8
+ - default `clear_state_mag` to `True` to avoid memory problems
9
+ - include optional initial magnetization in execute_graph
10
+ - fixed numpy version in playground
11
+ - 0.3.12
12
+ - Changed how to return magnetization from the simulation, see pull request #97
13
+ - 0.3.11
14
+ - new util functions for phantom loading and simulating
15
+ - 0.3.10
16
+ - phantom_motion and voxel_motion now also exists in VoxelGridPhantom
17
+ - new simple simulate function in util, that directly accepts a VoxelGridPhantom
18
+ - 0.3.9
19
+ - New simple load_default_phantom function in util
20
+ - 0.3.8
21
+ - Bugfix missing tensor dtype (#82)
22
+ - Support for 0 shim array shape_id
23
+ - Default shim in importer for pulses that do not specify any
24
+ - Deprecated old importer
25
+ - 0.3.7
26
+ - Support for loading .seq files with pTx rf_shim extension for pulseq
27
+ - Support for loading .dsv files
28
+ - 0.3.6
29
+ - Support for complex B1 maps (#80)
30
+ - Isochromat bugfix (#74)
31
+ - 0.3.5
32
+ - centered signal on adc samples in `insert_signal_plot()`
33
+ - ensured `tissue_masks` is never zero to fix remaining bugs
34
+ - 0.3.4
35
+ - Bugfix: `insert_signal_plot()` now respects adc delay
36
+ - 0.3.3
37
+ - Bugfix: `VoxelGridPhantom.interpolate()` and `.scale()` now work again
38
+ - 0.3.2
39
+ - Added tissue maps to phantom and plotting (#68)
40
+ - Fixed `.plot()`ting of 3D VoxelGridPhantom, added slice parameter
41
+ - Added `simulate_2D` to util for easy simulation of pypulseq sequences
1
42
  - 0.3.1
2
43
  - WIP .dsv support with pydisseqt 0.1.5
3
44
  - changed type annotation in util.imshow for python 3.9 compatibility
@@ -1,6 +1,6 @@
1
1
  # This file is automatically @generated by Cargo.
2
2
  # It is not intended for manual editing.
3
- version = 3
3
+ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "autocfg"
@@ -59,7 +59,7 @@ dependencies = [
59
59
 
60
60
  [[package]]
61
61
  name = "mrzero_core"
62
- version = "0.3.1"
62
+ version = "0.4.2"
63
63
  dependencies = [
64
64
  "num-complex",
65
65
  "pyo3",
@@ -1,11 +1,13 @@
1
1
  [package]
2
2
  name = "mrzero_core"
3
- version = "0.3.1"
3
+ version = "0.4.2"
4
4
  edition = "2021"
5
+ readme = "README.md"
5
6
 
6
7
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8
  [lib]
8
9
  crate-type = ["cdylib"]
10
+ name = "MRzeroCore"
9
11
 
10
12
  [dependencies]
11
13
  pyo3 = { version = "0.21.2", features = ["abi3-py37", "extension-module", "num-complex"] }
@@ -1,28 +1,32 @@
1
- Metadata-Version: 2.3
2
- Name: MRzeroCore
3
- Version: 0.3.1
1
+ Metadata-Version: 2.4
2
+ Name: mrzerocore
3
+ Version: 0.4.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
7
7
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
8
- Requires-Dist: torch >=1.12
8
+ Requires-Dist: ismrmrd
9
+ Requires-Dist: matplotlib>=3.5
10
+ Requires-Dist: pydisseqt>=0.1.13
9
11
  Requires-Dist: pypulseq
10
- Requires-Dist: matplotlib >=3.5
11
- Requires-Dist: scipy >=1.7
12
- Requires-Dist: requests >=2.20
12
+ Requires-Dist: requests>=2.20
13
13
  Requires-Dist: scikit-image
14
+ Requires-Dist: scipy>=1.7
14
15
  Requires-Dist: torchkbnufft
15
- Requires-Dist: pydisseqt >=0.1.4
16
+ Requires-Dist: torch>=1.12
17
+ Requires-Dist: tqdm
18
+ Requires-Dist: nibabel
16
19
  License-File: LICENSE
17
20
  Summary: Core functionality of MRzero
18
21
  Author-email: Jonathan Endres <jonathan.endres@uk-erlangen.de>
19
22
  Requires-Python: >=3.9
20
23
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
- Project-URL: Repository, https://github.com/MRsources/MRzero-Core
22
- Project-URL: Documentation, https://mrzero-core.readthedocs.io/
24
+ Project-URL: Documentation, https://mrsources.github.io/MRzero-Core/
23
25
  Project-URL: MRzero-Paper, https://arxiv.org/abs/2002.04265
26
+ Project-URL: Repository, https://github.com/MRsources/MRzero-Core
24
27
 
25
28
  [![Documentation Status](https://readthedocs.org/projects/mrzero-core/badge/?version=latest)](https://mrzero-core.readthedocs.io/en/latest/?badge=latest)
29
+ ![PyPI - Version](https://img.shields.io/pypi/v/MRzeroCore)
26
30
 
27
31
  # MRzero Core
28
32
 
@@ -43,7 +47,29 @@ The typical way of using it is like the following:
43
47
  import MRzeroCore as mr0
44
48
  ```
45
49
 
46
- Examples on how to use can be found in the [Playground](https://mrzero-core.readthedocs.io/en/latest/playground_mr0/overview.html).
50
+ Examples on how to use MR-zero can be found in the [Playground](https://mrzero-core.readthedocs.io/en/latest/playground_mr0/overview.html).
51
+
52
+ ## Pulseq Integration
53
+
54
+ **MRzero Core makes Pulseq simulation incredibly easy** - simulate any .seq file in just one line:
55
+
56
+ ```python
57
+ import MRzeroCore as mr0
58
+
59
+ # Simulate any Pulseq file
60
+ seq = mr0.Sequence.import_file("your_sequence.seq")
61
+ signal = mr0.util.simulate(seq) # That's it!
62
+ ```
63
+
64
+ ### Key Features:
65
+ - **One-line simulation** of any Pulseq .seq file
66
+ - **PyPulseq integration** - write sequences in Python, simulate with MR-zero
67
+ - **Google Colab ready** - [13+ ready-to-run examples](https://mrzero-core.readthedocs.io/en/latest/playground_mr0/overview.html#code-and-simulate-pypulseq)
68
+ - **MATLAB ↔ Python workflow** - create in MATLAB Pulseq, simulate in Python
69
+ - **No dependencies** - fully self-contained Pulseq parser included
70
+ - **Scanner-ready export** - export MR-zero sequences as .seq files
71
+
72
+ Try it now: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MRsources/MRzero-Core/blob/main/documentation/playground_mr0/mr0_upload_seq.ipynb)
47
73
 
48
74
  ## Links
49
75
 
@@ -69,11 +95,18 @@ maturin build --interpreter python
69
95
  docker run --rm -v <path-to-repo>/MRzero-Core:/io ghcr.io/pyo3/maturin build
70
96
  ```
71
97
 
72
- To **build the documentation**, run
98
+ **Building the documentation**
99
+
100
+ Install newest (beta) version of mdBook:
101
+ ```bash
102
+ cargo install --git https://github.com/rust-lang/mdBook.git mdbook
73
103
  ```
74
- jupyter-book build documentation/
104
+
105
+ Run a live-preview server:
106
+ ```bash
107
+ # in the root directory:
108
+ mdbook serve documentation
75
109
  ```
76
- in the root folder of this project. This requires jupyter-book as well as MRzeroCore itself to be installed.
77
110
 
78
111
 
79
112
  ## Official builds
@@ -1,4 +1,5 @@
1
1
  [![Documentation Status](https://readthedocs.org/projects/mrzero-core/badge/?version=latest)](https://mrzero-core.readthedocs.io/en/latest/?badge=latest)
2
+ ![PyPI - Version](https://img.shields.io/pypi/v/MRzeroCore)
2
3
 
3
4
  # MRzero Core
4
5
 
@@ -19,7 +20,29 @@ The typical way of using it is like the following:
19
20
  import MRzeroCore as mr0
20
21
  ```
21
22
 
22
- Examples on how to use can be found in the [Playground](https://mrzero-core.readthedocs.io/en/latest/playground_mr0/overview.html).
23
+ Examples on how to use MR-zero can be found in the [Playground](https://mrzero-core.readthedocs.io/en/latest/playground_mr0/overview.html).
24
+
25
+ ## Pulseq Integration
26
+
27
+ **MRzero Core makes Pulseq simulation incredibly easy** - simulate any .seq file in just one line:
28
+
29
+ ```python
30
+ import MRzeroCore as mr0
31
+
32
+ # Simulate any Pulseq file
33
+ seq = mr0.Sequence.import_file("your_sequence.seq")
34
+ signal = mr0.util.simulate(seq) # That's it!
35
+ ```
36
+
37
+ ### Key Features:
38
+ - **One-line simulation** of any Pulseq .seq file
39
+ - **PyPulseq integration** - write sequences in Python, simulate with MR-zero
40
+ - **Google Colab ready** - [13+ ready-to-run examples](https://mrzero-core.readthedocs.io/en/latest/playground_mr0/overview.html#code-and-simulate-pypulseq)
41
+ - **MATLAB ↔ Python workflow** - create in MATLAB Pulseq, simulate in Python
42
+ - **No dependencies** - fully self-contained Pulseq parser included
43
+ - **Scanner-ready export** - export MR-zero sequences as .seq files
44
+
45
+ Try it now: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MRsources/MRzero-Core/blob/main/documentation/playground_mr0/mr0_upload_seq.ipynb)
23
46
 
24
47
  ## Links
25
48
 
@@ -45,11 +68,18 @@ maturin build --interpreter python
45
68
  docker run --rm -v <path-to-repo>/MRzero-Core:/io ghcr.io/pyo3/maturin build
46
69
  ```
47
70
 
48
- To **build the documentation**, run
71
+ **Building the documentation**
72
+
73
+ Install newest (beta) version of mdBook:
74
+ ```bash
75
+ cargo install --git https://github.com/rust-lang/mdBook.git mdbook
49
76
  ```
50
- jupyter-book build documentation/
77
+
78
+ Run a live-preview server:
79
+ ```bash
80
+ # in the root directory:
81
+ mdbook serve documentation
51
82
  ```
52
- in the root folder of this project. This requires jupyter-book as well as MRzeroCore itself to be installed.
53
83
 
54
84
 
55
85
  ## Official builds
@@ -0,0 +1,12 @@
1
+ [book]
2
+ title = "MR-zero"
3
+ description = "Documentation for MR-zero Core and some of its adjacent projects."
4
+ authors = ["Madga Duarte", "Jonathan Endres", "Moritz Zaiss"]
5
+ language = "en"
6
+ src = "src"
7
+
8
+ [output.html]
9
+ mathjax-support = true
10
+ git-repository-url = "https://github.com/MRsources/MRzero-Core"
11
+ edit-url-template = "https://github.com/MRsources/MRzero-Core/edit/main/documentation/{path}"
12
+ site-url = "/mrzero-core/"