mrzerocore 0.4.2__tar.gz → 0.4.4__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 (134) hide show
  1. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/.github/workflows/playground_test.yml +2 -2
  2. mrzerocore-0.4.4/.github/workflows/pypi_publish.yml +217 -0
  3. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/.github/workflows/simulation_test.yml +1 -1
  4. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/CHANGELOG.md +10 -0
  5. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/Cargo.lock +1 -1
  6. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/Cargo.toml +1 -2
  7. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/PKG-INFO +1 -1
  8. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_DREAM_STE_seq.ipynb +1 -1
  9. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_DWI_SE_EPI.ipynb +1 -1
  10. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_EPI_2D_seq.ipynb +1 -1
  11. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_FID_seq.ipynb +1 -1
  12. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_FLASH_2D_seq.ipynb +1 -1
  13. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_GRE_to_FLASH.ipynb +1 -1
  14. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_RARE_2D_seq.ipynb +1 -1
  15. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_SE_CPMG_seq.ipynb +1 -1
  16. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_STE_3pulses_5echoes_seq.ipynb +1 -1
  17. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_TSE_2D_multi_shot_seq.ipynb +1 -1
  18. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_bSSFP_2D_seq.ipynb +1 -1
  19. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_diffusion_prep_STEAM_2D_seq.ipynb +1 -1
  20. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/SUMMARY.md +6 -0
  21. mrzerocore-0.4.4/documentation/src/pulseqzero-math.md +55 -0
  22. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/pyproject.toml +2 -2
  23. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/nifti_phantom.py +1 -1
  24. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/tissue_dict.py +21 -15
  25. mrzerocore-0.4.2/.github/workflows/pypi_publish.yml +0 -148
  26. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/.github/workflows/deploy_docs.yml +0 -0
  27. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/.gitignore +0 -0
  28. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/EULA.txt +0 -0
  29. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/LICENSE +0 -0
  30. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/README.md +0 -0
  31. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/book.toml +0 -0
  32. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/AdjDataUser2gB0_transversal_0.08moving_average.mat +0 -0
  33. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/Pulseq_zero_FLASH_FAopt_PSFtask.ipynb +0 -0
  34. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/Pulseq_zero_TSE_FAopt_SARtask.ipynb +0 -0
  35. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/flash.ipynb +0 -0
  36. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/legacy_seqs/flash_DWI.ipynb +0 -0
  37. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/legacy_seqs/mr0_CS_cartesian_seq.ipynb +0 -0
  38. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/legacy_seqs/mr0_CS_radial_seq.ipynb +0 -0
  39. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/legacy_seqs/mr0_DWI_GRE_2D_seq.ipynb +0 -0
  40. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/legacy_seqs/mr0_spiral_GRE.ipynb +0 -0
  41. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr00_FLASH_2D_ernstAngle_opt.ipynb +0 -0
  42. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_DREAM_STID_seq.ipynb +0 -0
  43. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_RARE_2D_seq_multi_shot.ipynb +0 -0
  44. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_opt_FLASH_2D_IR_Fit_T1.ipynb +0 -0
  45. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_opt_FLASH_2D_IR_voxelNN_T1.ipynb +0 -0
  46. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_pypulseq_exmpls_seq.ipynb +0 -0
  47. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/mr0_upload_seq.ipynb +0 -0
  48. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/numerical_brain_cropped.mat +0 -0
  49. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/ptx_phantom.p +0 -0
  50. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/pulseq_flash.ipynb +0 -0
  51. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/pulseq_rf_shim.ipynb +0 -0
  52. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/pulseq_sim_pTx.ipynb +0 -0
  53. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/pulseq_zero_DESC_demo.ipynb +0 -0
  54. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/reference_bssfp_data_feb2025.npz +0 -0
  55. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/seqs/flash pTx CP.seq +0 -0
  56. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/seqs/flash pTx EP.seq +0 -0
  57. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/seqs/flash pTx QM.seq +0 -0
  58. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/subject05.npz +0 -0
  59. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/Pulseq_2D_density_adapted_radial.ipynb +0 -0
  60. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/gpt4mr.ipynb +0 -0
  61. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/improved_mr0_RARE_2D_seq.ipynb +0 -0
  62. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/improved_mr0_RARE_2D_seq_nonsel.ipynb +0 -0
  63. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/mr0_EPI_2D_with_ORC_seq.ipynb +0 -0
  64. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/mr0_burst_TSE.ipynb +0 -0
  65. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/mr0_spiral_GRE.ipynb +0 -0
  66. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/playground_mr0/unsorted/numerical_brain_cropped.mat +0 -0
  67. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/README.md +0 -0
  68. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-nifti.md +0 -0
  69. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-phantom.md +0 -0
  70. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-reconstruction.md +0 -0
  71. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-sequence.md +0 -0
  72. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-simulation.md +0 -0
  73. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-unsorted.md +0 -0
  74. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api-util.md +0 -0
  75. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/api.md +0 -0
  76. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/faq.md +0 -0
  77. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/integration-matlab.md +0 -0
  78. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/integration-pulseq.md +0 -0
  79. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/integration-pulseqzero.md +0 -0
  80. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/integration.md +0 -0
  81. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/literature.md +0 -0
  82. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/logo.png +0 -0
  83. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/nifti-coords.md +0 -0
  84. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/nifti-generate.md +0 -0
  85. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/nifti-spec.md +0 -0
  86. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/nifti.md +0 -0
  87. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/playground.md +0 -0
  88. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/documentation/src/state_selection.md +0 -0
  89. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/__init__.py +0 -0
  90. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/brainweb/.gitignore +0 -0
  91. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/brainweb/__init__.py +0 -0
  92. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/brainweb/brainweb_data.json +0 -0
  93. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/brainweb/brainweb_data_sources.txt +0 -0
  94. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/brainweb/output/.gitkeep +0 -0
  95. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/custom_voxel_phantom.py +0 -0
  96. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/sim_data.py +0 -0
  97. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/phantom/voxel_grid_phantom.py +0 -0
  98. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/exporter.py +0 -0
  99. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/exporter_v2.py +0 -0
  100. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/helpers.py +0 -0
  101. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_exporter.py +0 -0
  102. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/__init__.py +0 -0
  103. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/adc.py +0 -0
  104. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/helpers.py +0 -0
  105. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulse.py +0 -0
  106. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/__init__.py +0 -0
  107. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/adc.py +0 -0
  108. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/block.py +0 -0
  109. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/definitons.py +0 -0
  110. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/gradient.py +0 -0
  111. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/helpers.py +0 -0
  112. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/rf.py +0 -0
  113. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/pulseq_file/trap.py +0 -0
  114. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/pulseq/pulseq_loader/spoiler.py +0 -0
  115. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/reconstruction.py +0 -0
  116. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/sequence.py +0 -0
  117. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/simulation/isochromat_sim.py +0 -0
  118. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/simulation/main_pass.py +0 -0
  119. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/simulation/pre_pass.py +0 -0
  120. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/simulation/sig_to_mrd.py +0 -0
  121. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/python/MRzeroCore/util.py +0 -0
  122. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/src/lib.rs +0 -0
  123. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/src/pre_pass.rs +0 -0
  124. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/README.md +0 -0
  125. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/__init__.py +0 -0
  126. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/playground_test.py +0 -0
  127. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/config.py +0 -0
  128. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/generate_actual_files.py +0 -0
  129. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/generate_files.py +0 -0
  130. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/generate_ref_files.py +0 -0
  131. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/generate_seq_files.py +0 -0
  132. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/test_simulation.ps1 +0 -0
  133. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/simulation_test/test_simulation.py +0 -0
  134. {mrzerocore-0.4.2 → mrzerocore-0.4.4}/tests/utils.py +0 -0
@@ -52,10 +52,10 @@ jobs:
52
52
 
53
53
  - name: Install dependencies
54
54
  run: |
55
- pip install pypulseq &> /dev/null
55
+ pip install pypulseq==1.4.2post1 &> /dev/null
56
56
  pip install pydisseqt
57
- pip install MRzeroCore --no-deps
58
57
  pip install ismrmrd
58
+ pip install MRzeroCore --no-deps
59
59
  pip install torchkbnufft PyWavelets tqdm scikit-image
60
60
  wget https://github.com/MRsources/MRzero-Core/raw/main/documentation/playground_mr0/numerical_brain_cropped.mat &> /dev/null
61
61
  pip install jupyter nbconvert
@@ -0,0 +1,217 @@
1
+ # This file is autogenerated by maturin v1.11.5
2
+ # Manually removed win11 arm and freethreaded python builds
3
+ # To update, run
4
+ #
5
+ # maturin generate-ci github -o .github/workflows/pypi_publish.yml
6
+ #
7
+ name: CI
8
+
9
+ on:
10
+ push:
11
+ branches:
12
+ - main
13
+ - master
14
+ tags:
15
+ - '*'
16
+ pull_request:
17
+ workflow_dispatch:
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ linux:
24
+ runs-on: ${{ matrix.platform.runner }}
25
+ strategy:
26
+ matrix:
27
+ platform:
28
+ - runner: ubuntu-22.04
29
+ target: x86_64
30
+ - runner: ubuntu-22.04
31
+ target: x86
32
+ - runner: ubuntu-22.04
33
+ target: aarch64
34
+ - runner: ubuntu-22.04
35
+ target: armv7
36
+ - runner: ubuntu-22.04
37
+ target: s390x
38
+ - runner: ubuntu-22.04
39
+ target: ppc64le
40
+ steps:
41
+ - uses: actions/checkout@v6
42
+ - uses: actions/setup-python@v6
43
+ with:
44
+ python-version: 3.x
45
+ - name: Build wheels
46
+ uses: PyO3/maturin-action@v1
47
+ with:
48
+ target: ${{ matrix.platform.target }}
49
+ args: --release --out dist
50
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
51
+ manylinux: auto
52
+ # - name: Build free-threaded wheels
53
+ # uses: PyO3/maturin-action@v1
54
+ # with:
55
+ # target: ${{ matrix.platform.target }}
56
+ # args: --release --out dist -i python3.14t
57
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
58
+ # manylinux: auto
59
+ - name: Upload wheels
60
+ uses: actions/upload-artifact@v5
61
+ with:
62
+ name: wheels-linux-${{ matrix.platform.target }}
63
+ path: dist
64
+
65
+ musllinux:
66
+ runs-on: ${{ matrix.platform.runner }}
67
+ strategy:
68
+ matrix:
69
+ platform:
70
+ - runner: ubuntu-22.04
71
+ target: x86_64
72
+ - runner: ubuntu-22.04
73
+ target: x86
74
+ - runner: ubuntu-22.04
75
+ target: aarch64
76
+ - runner: ubuntu-22.04
77
+ target: armv7
78
+ steps:
79
+ - uses: actions/checkout@v6
80
+ - uses: actions/setup-python@v6
81
+ with:
82
+ python-version: 3.x
83
+ - name: Build wheels
84
+ uses: PyO3/maturin-action@v1
85
+ with:
86
+ target: ${{ matrix.platform.target }}
87
+ args: --release --out dist
88
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
89
+ manylinux: musllinux_1_2
90
+ # - name: Build free-threaded wheels
91
+ # uses: PyO3/maturin-action@v1
92
+ # with:
93
+ # target: ${{ matrix.platform.target }}
94
+ # args: --release --out dist -i python3.14t
95
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
96
+ # manylinux: musllinux_1_2
97
+ - name: Upload wheels
98
+ uses: actions/upload-artifact@v5
99
+ with:
100
+ name: wheels-musllinux-${{ matrix.platform.target }}
101
+ path: dist
102
+
103
+ windows:
104
+ runs-on: ${{ matrix.platform.runner }}
105
+ strategy:
106
+ matrix:
107
+ platform:
108
+ - runner: windows-latest
109
+ target: x64
110
+ python_arch: x64
111
+ - runner: windows-latest
112
+ target: x86
113
+ python_arch: x86
114
+ # - runner: windows-11-arm
115
+ # target: aarch64
116
+ # python_arch: arm64
117
+ steps:
118
+ - uses: actions/checkout@v6
119
+ - uses: actions/setup-python@v6
120
+ with:
121
+ python-version: 3.13
122
+ architecture: ${{ matrix.platform.python_arch }}
123
+ - name: Build wheels
124
+ uses: PyO3/maturin-action@v1
125
+ with:
126
+ target: ${{ matrix.platform.target }}
127
+ args: --release --out dist
128
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
129
+ - uses: actions/setup-python@v6
130
+ with:
131
+ python-version: 3.14t
132
+ architecture: ${{ matrix.platform.python_arch }}
133
+ # - name: Build free-threaded wheels
134
+ # uses: PyO3/maturin-action@v1
135
+ # with:
136
+ # target: ${{ matrix.platform.target }}
137
+ # args: --release --out dist -i python3.14t
138
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
139
+ - name: Upload wheels
140
+ uses: actions/upload-artifact@v5
141
+ with:
142
+ name: wheels-windows-${{ matrix.platform.target }}
143
+ path: dist
144
+
145
+ macos:
146
+ runs-on: ${{ matrix.platform.runner }}
147
+ strategy:
148
+ matrix:
149
+ platform:
150
+ - runner: macos-15-intel
151
+ target: x86_64
152
+ - runner: macos-latest
153
+ target: aarch64
154
+ steps:
155
+ - uses: actions/checkout@v6
156
+ - uses: actions/setup-python@v6
157
+ with:
158
+ python-version: 3.x
159
+ - name: Build wheels
160
+ uses: PyO3/maturin-action@v1
161
+ with:
162
+ target: ${{ matrix.platform.target }}
163
+ args: --release --out dist
164
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
165
+ # - name: Build free-threaded wheels
166
+ # uses: PyO3/maturin-action@v1
167
+ # with:
168
+ # target: ${{ matrix.platform.target }}
169
+ # args: --release --out dist -i python3.14t
170
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
171
+ - name: Upload wheels
172
+ uses: actions/upload-artifact@v5
173
+ with:
174
+ name: wheels-macos-${{ matrix.platform.target }}
175
+ path: dist
176
+
177
+ sdist:
178
+ runs-on: ubuntu-latest
179
+ steps:
180
+ - uses: actions/checkout@v6
181
+ - name: Build sdist
182
+ uses: PyO3/maturin-action@v1
183
+ with:
184
+ command: sdist
185
+ args: --out dist
186
+ - name: Upload sdist
187
+ uses: actions/upload-artifact@v5
188
+ with:
189
+ name: wheels-sdist
190
+ path: dist
191
+
192
+ release:
193
+ name: Release
194
+ runs-on: ubuntu-latest
195
+ # if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
196
+ needs: [linux, musllinux, windows, macos, sdist]
197
+ permissions:
198
+ # Use to sign the release artifacts
199
+ id-token: write
200
+ # Used to upload release artifacts
201
+ contents: write
202
+ # Used to generate artifact attestation
203
+ attestations: write
204
+ steps:
205
+ - uses: actions/download-artifact@v6
206
+ - name: Generate artifact attestation
207
+ uses: actions/attest-build-provenance@v3
208
+ with:
209
+ subject-path: 'wheels-*/*'
210
+ - name: Install uv
211
+ # if: ${{ startsWith(github.ref, 'refs/tags/') }}
212
+ uses: astral-sh/setup-uv@v7
213
+ - name: Publish to PyPI
214
+ # if: ${{ startsWith(github.ref, 'refs/tags/') }}
215
+ run: uv publish 'wheels-*/*'
216
+ env:
217
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
@@ -41,7 +41,7 @@ jobs:
41
41
 
42
42
  - name: Install dependencies
43
43
  run: |
44
- pip install pypulseq
44
+ pip install pypulseq==1.4.2post1 &> /dev/null
45
45
  pip install torchkbnufft
46
46
  pip install nbformat
47
47
 
@@ -1,3 +1,13 @@
1
+ - 0.4.4
2
+ - Fix: support for empty tissue masks in NIfTI phantom
3
+ - Fix: support for int - constants in NIfTI phantom
4
+ - Remove unsupported platforms from build (32bit windows, intel mac)
5
+ - 0.4.3
6
+ - Fix python package normalization
7
+ - 0.4.2
8
+ - Add NIfTI phantom support
9
+ - Fix custom voxel phantom plot
10
+ - Make isochromat sim GPU compatible
1
11
  - 0.4.0
2
12
  - Integrate ISMRMD exporter
3
13
  - Update documentation
@@ -59,7 +59,7 @@ dependencies = [
59
59
 
60
60
  [[package]]
61
61
  name = "mrzero_core"
62
- version = "0.4.2"
62
+ version = "0.4.4"
63
63
  dependencies = [
64
64
  "num-complex",
65
65
  "pyo3",
@@ -1,13 +1,12 @@
1
1
  [package]
2
2
  name = "mrzero_core"
3
- version = "0.4.2"
3
+ version = "0.4.4"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
 
7
7
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8
8
  [lib]
9
9
  crate-type = ["cdylib"]
10
- name = "MRzeroCore"
11
10
 
12
11
  [dependencies]
13
12
  pyo3 = { version = "0.21.2", features = ["abi3-py37", "extension-module", "num-complex"] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mrzerocore
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -49,7 +49,7 @@
49
49
  }
50
50
  ],
51
51
  "source": [
52
- "!pip install pypulseq &> /dev/null\n",
52
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
53
53
  "!pip install torchkbnufft --no-deps\n",
54
54
  "!pip install ismrmrd\n",
55
55
  "!pip install MRzeroCore --no-deps\n",
@@ -46,7 +46,7 @@
46
46
  }
47
47
  ],
48
48
  "source": [
49
- "!pip install pypulseq &> /dev/null\n",
49
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
50
50
  "!pip install torchkbnufft --no-deps\n",
51
51
  "!pip install ismrmrd\n",
52
52
  "!pip install MRzeroCore --no-deps\n",
@@ -35,7 +35,7 @@
35
35
  }
36
36
  ],
37
37
  "source": [
38
- "!pip install pypulseq &> /dev/null\n",
38
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
39
39
  "!pip install torchkbnufft --no-deps\n",
40
40
  "!pip install ismrmrd\n",
41
41
  "!pip install MRzeroCore --no-deps\n",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "outputs": [],
23
23
  "source": [
24
- "!pip install pypulseq &> /dev/null\n",
24
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
25
25
  "!pip install torchkbnufft --no-deps\n",
26
26
  "!pip install ismrmrd\n",
27
27
  "!pip install MRzeroCore --no-deps\n",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  ],
51
51
  "source": [
52
- "!pip install pypulseq &> /dev/null\n",
52
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
53
53
  "!pip install torchkbnufft --no-deps\n",
54
54
  "!pip install ismrmrd\n",
55
55
  "!pip install MRzeroCore --no-deps\n",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "outputs": [],
27
27
  "source": [
28
- "!pip install pypulseq &> /dev/null\n",
28
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
29
29
  "!pip install torchkbnufft --no-deps\n",
30
30
  "!pip install ismrmrd\n",
31
31
  "!pip install MRzeroCore --no-deps\n",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "outputs": [],
23
23
  "source": [
24
- "!pip install pypulseq &> /dev/null\n",
24
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
25
25
  "!pip install torchkbnufft --no-deps\n",
26
26
  "!pip install ismrmrd\n",
27
27
  "!pip install MRzeroCore --no-deps\n",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "outputs": [],
23
23
  "source": [
24
- "!pip install pypulseq &> /dev/null\n",
24
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
25
25
  "!pip install torchkbnufft --no-deps\n",
26
26
  "!pip install ismrmrd\n",
27
27
  "!pip install MRzeroCore --no-deps\n",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "outputs": [],
23
23
  "source": [
24
- "!pip install pypulseq &> /dev/null\n",
24
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
25
25
  "!pip install torchkbnufft --no-deps\n",
26
26
  "!pip install ismrmrd\n",
27
27
  "!pip install MRzeroCore --no-deps\n",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "outputs": [],
27
27
  "source": [
28
- "!pip install pypulseq &> /dev/null\n",
28
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
29
29
  "!pip install torchkbnufft --no-deps\n",
30
30
  "!pip install ismrmrd\n",
31
31
  "!pip install MRzeroCore --no-deps\n",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  ],
51
51
  "source": [
52
- "!pip install pypulseq &> /dev/null\n",
52
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
53
53
  "!pip install torchkbnufft --no-deps\n",
54
54
  "!pip install ismrmrd\n",
55
55
  "!pip install MRzeroCore --no-deps\n",
@@ -31,7 +31,7 @@
31
31
  }
32
32
  ],
33
33
  "source": [
34
- "!pip install pypulseq &> /dev/null\n",
34
+ "!pip install pypulseq==1.4.2post1 &> /dev/null\n",
35
35
  "!pip install torchkbnufft --no-deps\n",
36
36
  "!pip install ismrmrd\n",
37
37
  "!pip install MRzeroCore --no-deps\n",
@@ -32,6 +32,12 @@
32
32
  - [Reconstruction methods](api-reconstruction.md)
33
33
  - [util module](api-util.md)
34
34
  - [Other methods](api-unsorted.md)
35
+
36
+
37
+ # 📊 Pulseq-zero
38
+
39
+ - [Math methods for differentiability](pulseqzero-math.md)
40
+
35
41
 
36
42
  ---
37
43
 
@@ -0,0 +1,55 @@
1
+ # Differentiable Rounding Helpers for Pulseq Zero Sequences
2
+
3
+ This module provides **differentiable stand-ins** for common rounding operations (`ceil`, `floor`, `round`) used in **Pulseq sequences**.
4
+ They are designed to keep the optimization pipeline differentiable by **passing gradients through unchanged**, effectively treating these operations as the identity during backpropagation.
5
+
6
+
7
+ ---
8
+
9
+ ## Design idea
10
+
11
+ * **Forward pass**: Behaves exactly like the corresponding PyTorch / NumPy rounding operation.
12
+ * **Backward pass**: Returns the incoming gradient unchanged.
13
+ * **Use case**: Allows differentiable optimization of otherwise discrete parameters.
14
+
15
+
16
+ ---
17
+
18
+
19
+
20
+ ## Functional Wrappers
21
+
22
+ To use the wrapper functions:
23
+
24
+ ```python
25
+ from pulseqzero import round, ceil, floor
26
+ ```
27
+
28
+
29
+ ### `ceil(x)`
30
+
31
+ Differentiable version of `torch.ceil`.
32
+
33
+ ```python
34
+ y = ceil(x)
35
+ ```
36
+
37
+ ### `floor(x)`
38
+
39
+ Differentiable version of `torch.floor`.
40
+
41
+ ```python
42
+ y = floor(x)
43
+ ```
44
+
45
+ ### `round(x)`
46
+
47
+ Differentiable version of `torch.round`.
48
+
49
+ ```python
50
+ y = round(x)
51
+ ```
52
+
53
+ ---
54
+
55
+
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "mrzerocore"
7
- version = "0.4.2"
7
+ version = "0.4.4"
8
8
  description = "Core functionality of MRzero"
9
9
  authors = [
10
10
  {name = "Jonathan Endres", email = "jonathan.endres@uk-erlangen.de"},
@@ -39,5 +39,5 @@ MRzero-Paper = "https://arxiv.org/abs/2002.04265"
39
39
  [tool.maturin]
40
40
  profile = "release"
41
41
  strip = true
42
- module-name = "mrzerocore._prepass"
42
+ module-name = "MRzeroCore._prepass"
43
43
  python-source = "python"
@@ -138,7 +138,7 @@ class NiftiTissue:
138
138
 
139
139
  def to_dict(self) -> dict:
140
140
  def serialize_prop(prop):
141
- if isinstance(prop, float):
141
+ if isinstance(prop, (float, int)):
142
142
  return prop
143
143
  elif isinstance(prop, NiftiRef):
144
144
  return prop.to_str()
@@ -173,21 +173,27 @@ class TissueDict(dict[str, VoxelGridPhantom]):
173
173
  ) -> SimData:
174
174
  data_list = [self[tissue].build(PD_threshold, voxel_shape) for tissue in self]
175
175
 
176
- return SimData(
177
- PD=torch.cat([obj.PD for obj in data_list]),
178
- T1=torch.cat([obj.T1 for obj in data_list]),
179
- T2=torch.cat([obj.T2 for obj in data_list]),
180
- T2dash=torch.cat([obj.T2dash for obj in data_list]),
181
- D=torch.cat([obj.D for obj in data_list]),
182
- B0=torch.cat([obj.B0 for obj in data_list]),
183
- B1=torch.cat([obj.B1 for obj in data_list], 1),
184
- coil_sens=torch.cat([obj.coil_sens for obj in data_list], 1),
185
- voxel_pos=torch.cat([obj.voxel_pos for obj in data_list], 0),
186
- tissue_masks=torch.stack([obj.tissue_masks for obj in data_list]),
187
- size=data_list[0].size,
188
- nyquist=data_list[0].nyquist,
189
- dephasing_func=data_list[0].dephasing_func,
190
- )
176
+ kwargs = {
177
+ "PD": torch.cat([obj.PD for obj in data_list]),
178
+ "T1": torch.cat([obj.T1 for obj in data_list]),
179
+ "T2": torch.cat([obj.T2 for obj in data_list]),
180
+ "T2dash": torch.cat([obj.T2dash for obj in data_list]),
181
+ "D": torch.cat([obj.D for obj in data_list]),
182
+ "B0": torch.cat([obj.B0 for obj in data_list]),
183
+ "B1": torch.cat([obj.B1 for obj in data_list], 1),
184
+ "coil_sens": torch.cat([obj.coil_sens for obj in data_list], 1),
185
+ "voxel_pos": torch.cat([obj.voxel_pos for obj in data_list], 0),
186
+ "size": data_list[0].size,
187
+ "nyquist": data_list[0].nyquist,
188
+ "dephasing_func": data_list[0].dephasing_func,
189
+ }
190
+
191
+ # Only add tissue_masks if any object has it non-empty
192
+ if any(obj.tissue_masks for obj in data_list):
193
+ kwargs["tissue_masks"] = torch.stack([obj.tissue_masks for obj in data_list])
194
+
195
+ return SimData(**kwargs)
196
+
191
197
 
192
198
  # ============================
193
199
  # Helpers for importing NIfTIs
@@ -1,148 +0,0 @@
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-*/*
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes