qmrpy 0.1.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 (116) hide show
  1. qmrpy-0.1.2/.github/workflows/ci.yml +32 -0
  2. qmrpy-0.1.2/.gitignore +43 -0
  3. qmrpy-0.1.2/LICENSE +21 -0
  4. qmrpy-0.1.2/PKG-INFO +82 -0
  5. qmrpy-0.1.2/README.md +52 -0
  6. qmrpy-0.1.2/THIRD_PARTY_NOTICES.md +107 -0
  7. qmrpy-0.1.2/configs/base/.gitkeep +1 -0
  8. qmrpy-0.1.2/configs/exp/.gitkeep +1 -0
  9. qmrpy-0.1.2/configs/exp/b1_dam_baseline.toml +13 -0
  10. qmrpy-0.1.2/configs/exp/epg_backend_sweep.toml +21 -0
  11. qmrpy-0.1.2/configs/exp/epg_backend_sweep_beta150.toml +18 -0
  12. qmrpy-0.1.2/configs/exp/epg_backend_sweep_wide.toml +19 -0
  13. qmrpy-0.1.2/configs/exp/inversion_recovery_baseline.toml +15 -0
  14. qmrpy-0.1.2/configs/exp/mono_t2_baseline.toml +15 -0
  15. qmrpy-0.1.2/configs/exp/mwf_baseline.toml +26 -0
  16. qmrpy-0.1.2/configs/exp/test_mppca.toml +11 -0
  17. qmrpy-0.1.2/configs/exp/vfa_t1_b1range_gaussian.toml +18 -0
  18. qmrpy-0.1.2/configs/exp/vfa_t1_b1range_rician_outlier.toml +18 -0
  19. qmrpy-0.1.2/configs/exp/vfa_t1_baseline.toml +17 -0
  20. qmrpy-0.1.2/configs/exp/vfa_t1_rician.toml +18 -0
  21. qmrpy-0.1.2/notebooks/.gitkeep +1 -0
  22. qmrpy-0.1.2/notebooks/00_qmrpy_tutorial.ipynb +440 -0
  23. qmrpy-0.1.2/pyproject.toml +68 -0
  24. qmrpy-0.1.2/scripts/compare_runs.py +451 -0
  25. qmrpy-0.1.2/scripts/execute_notebook.py +28 -0
  26. qmrpy-0.1.2/scripts/octave/mwf_generate_and_fit.m +96 -0
  27. qmrpy-0.1.2/scripts/octave/verify_models.m +214 -0
  28. qmrpy-0.1.2/scripts/octave/verify_mppca.m +50 -0
  29. qmrpy-0.1.2/scripts/run_epg_backend_sweep.py +357 -0
  30. qmrpy-0.1.2/scripts/run_experiment.py +1130 -0
  31. qmrpy-0.1.2/scripts/sweep_qmrlab_mwf.py +181 -0
  32. qmrpy-0.1.2/scripts/verify_mppca.py +167 -0
  33. qmrpy-0.1.2/scripts/verify_parity.py +500 -0
  34. qmrpy-0.1.2/scripts/verify_qmrlab_mwf.py +246 -0
  35. qmrpy-0.1.2/src/epgpy/LICENSE +28 -0
  36. qmrpy-0.1.2/src/epgpy/__init__.py +12 -0
  37. qmrpy-0.1.2/src/epgpy/common.py +415 -0
  38. qmrpy-0.1.2/src/epgpy/core.py +83 -0
  39. qmrpy-0.1.2/src/epgpy/diff.py +579 -0
  40. qmrpy-0.1.2/src/epgpy/diffusion.py +176 -0
  41. qmrpy-0.1.2/src/epgpy/evolution.py +488 -0
  42. qmrpy-0.1.2/src/epgpy/exchange.py +282 -0
  43. qmrpy-0.1.2/src/epgpy/functions.py +369 -0
  44. qmrpy-0.1.2/src/epgpy/magnettransfer.py +192 -0
  45. qmrpy-0.1.2/src/epgpy/operator.py +361 -0
  46. qmrpy-0.1.2/src/epgpy/operators.py +25 -0
  47. qmrpy-0.1.2/src/epgpy/opmatrix.py +221 -0
  48. qmrpy-0.1.2/src/epgpy/opscalar.py +232 -0
  49. qmrpy-0.1.2/src/epgpy/plotting.py +295 -0
  50. qmrpy-0.1.2/src/epgpy/probe.py +222 -0
  51. qmrpy-0.1.2/src/epgpy/pulseio.py +83 -0
  52. qmrpy-0.1.2/src/epgpy/rfpulse.py +385 -0
  53. qmrpy-0.1.2/src/epgpy/sequence.py +985 -0
  54. qmrpy-0.1.2/src/epgpy/shift.py +663 -0
  55. qmrpy-0.1.2/src/epgpy/statematrix.py +794 -0
  56. qmrpy-0.1.2/src/epgpy/stats.py +213 -0
  57. qmrpy-0.1.2/src/epgpy/transition.py +247 -0
  58. qmrpy-0.1.2/src/epgpy/utilities/__init__.py +0 -0
  59. qmrpy-0.1.2/src/epgpy/utilities/ilt1d.py +271 -0
  60. qmrpy-0.1.2/src/epgpy/utils.py +233 -0
  61. qmrpy-0.1.2/src/qmrpy/__init__.py +3 -0
  62. qmrpy-0.1.2/src/qmrpy/_decaes/__init__.py +5 -0
  63. qmrpy-0.1.2/src/qmrpy/_decaes/nnls.py +601 -0
  64. qmrpy-0.1.2/src/qmrpy/_decaes/surrogate_1d.py +237 -0
  65. qmrpy-0.1.2/src/qmrpy/models/__init__.py +15 -0
  66. qmrpy-0.1.2/src/qmrpy/models/b1/__init__.py +4 -0
  67. qmrpy-0.1.2/src/qmrpy/models/b1/dam.py +123 -0
  68. qmrpy-0.1.2/src/qmrpy/models/noise/__init__.py +4 -0
  69. qmrpy-0.1.2/src/qmrpy/models/noise/denoising_mppca.py +361 -0
  70. qmrpy-0.1.2/src/qmrpy/models/t1/__init__.py +4 -0
  71. qmrpy-0.1.2/src/qmrpy/models/t1/inversion_recovery.py +206 -0
  72. qmrpy-0.1.2/src/qmrpy/models/t1/vfa_t1.py +357 -0
  73. qmrpy-0.1.2/src/qmrpy/models/t2/__init__.py +6 -0
  74. qmrpy-0.1.2/src/qmrpy/models/t2/decaes_t2.py +1083 -0
  75. qmrpy-0.1.2/src/qmrpy/models/t2/decaes_t2part.py +146 -0
  76. qmrpy-0.1.2/src/qmrpy/models/t2/mono_t2.py +208 -0
  77. qmrpy-0.1.2/src/qmrpy/models/t2/mwf.py +276 -0
  78. qmrpy-0.1.2/src/qmrpy/py.typed +1 -0
  79. qmrpy-0.1.2/src/qmrpy/sim/__init__.py +32 -0
  80. qmrpy-0.1.2/src/qmrpy/sim/noise.py +52 -0
  81. qmrpy-0.1.2/src/qmrpy/sim/phantoms.py +66 -0
  82. qmrpy-0.1.2/src/qmrpy/sim/simulation.py +542 -0
  83. qmrpy-0.1.2/tests/data/decaes_ref2_alpha.csv +1 -0
  84. qmrpy-0.1.2/tests/data/decaes_ref2_dist.csv +30 -0
  85. qmrpy-0.1.2/tests/data/decaes_ref2_mu.csv +1 -0
  86. qmrpy-0.1.2/tests/data/decaes_ref_alpha.csv +1 -0
  87. qmrpy-0.1.2/tests/data/decaes_ref_chi2_alpha.csv +1 -0
  88. qmrpy-0.1.2/tests/data/decaes_ref_chi2_chi2factor.csv +1 -0
  89. qmrpy-0.1.2/tests/data/decaes_ref_chi2_dist.csv +30 -0
  90. qmrpy-0.1.2/tests/data/decaes_ref_chi2_mu.csv +1 -0
  91. qmrpy-0.1.2/tests/data/decaes_ref_dist.csv +30 -0
  92. qmrpy-0.1.2/tests/data/decaes_ref_echotimes.csv +16 -0
  93. qmrpy-0.1.2/tests/data/decaes_ref_lcurve_alpha.csv +1 -0
  94. qmrpy-0.1.2/tests/data/decaes_ref_lcurve_chi2factor.csv +1 -0
  95. qmrpy-0.1.2/tests/data/decaes_ref_lcurve_dist.csv +30 -0
  96. qmrpy-0.1.2/tests/data/decaes_ref_lcurve_mu.csv +1 -0
  97. qmrpy-0.1.2/tests/data/decaes_ref_mdp_alpha.csv +1 -0
  98. qmrpy-0.1.2/tests/data/decaes_ref_mdp_chi2factor.csv +1 -0
  99. qmrpy-0.1.2/tests/data/decaes_ref_mdp_dist.csv +30 -0
  100. qmrpy-0.1.2/tests/data/decaes_ref_mdp_maxsig.csv +1 -0
  101. qmrpy-0.1.2/tests/data/decaes_ref_mdp_mu.csv +1 -0
  102. qmrpy-0.1.2/tests/data/decaes_ref_mdp_noiselevel_raw.csv +1 -0
  103. qmrpy-0.1.2/tests/data/decaes_ref_signal.csv +16 -0
  104. qmrpy-0.1.2/tests/data/decaes_ref_t2times.csv +30 -0
  105. qmrpy-0.1.2/tests/test_b1_dam.py +20 -0
  106. qmrpy-0.1.2/tests/test_decaes_parity.py +101 -0
  107. qmrpy-0.1.2/tests/test_decaes_t2.py +88 -0
  108. qmrpy-0.1.2/tests/test_decaes_t2part.py +40 -0
  109. qmrpy-0.1.2/tests/test_fixed_vectors.py +45 -0
  110. qmrpy-0.1.2/tests/test_import.py +45 -0
  111. qmrpy-0.1.2/tests/test_inversion_recovery.py +61 -0
  112. qmrpy-0.1.2/tests/test_mppca.py +34 -0
  113. qmrpy-0.1.2/tests/test_mwf.py +59 -0
  114. qmrpy-0.1.2/tests/test_simulation.py +32 -0
  115. qmrpy-0.1.2/tests/test_vfa_t1.py +101 -0
  116. qmrpy-0.1.2/uv.lock +1849 -0
@@ -0,0 +1,32 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ python-version: ["3.11"]
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+
23
+ - name: Set up uv
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ enable-cache: true
27
+
28
+ - name: Sync dependencies
29
+ run: uv sync --locked --extra viz --extra dev
30
+
31
+ - name: Run tests
32
+ run: uv run --locked -m pytest
qmrpy-0.1.2/.gitignore ADDED
@@ -0,0 +1,43 @@
1
+ # outputs / data
2
+ /output/
3
+ /data/
4
+ /configs/local/
5
+ docs/
6
+
7
+ # upstream reference (MATLAB)
8
+ qMRLab/
9
+
10
+ # upstream/vendor worktrees (do not commit; vendored snapshot lives under src/)
11
+ /epgpy/
12
+ /DECAES.jl/
13
+
14
+ # environments / caches
15
+ .venv/
16
+ __pycache__/
17
+ *.pyc
18
+ .pytest_cache/
19
+ .mypy_cache/
20
+ .ruff_cache/
21
+ .cache/
22
+ .uv_cache/
23
+
24
+ # packaging outputs
25
+ dist/
26
+ build/
27
+ *.egg-info/
28
+
29
+ # OS/editor
30
+ .DS_Store
31
+ Thumbs.db
32
+ .vscode/
33
+ .idea/
34
+
35
+ # logs
36
+ *.log
37
+
38
+ # secrets (原則使わないが、万一置くなら絶対に管理しない)
39
+ .env
40
+ .env.*
41
+
42
+ # local-only agent instructions
43
+ AGENTS.md
qmrpy-0.1.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Kohei Sugimoto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
qmrpy-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.4
2
+ Name: qmrpy
3
+ Version: 0.1.2
4
+ Summary: Python implementation (translation) of qMRLab models for quantitative MRI.
5
+ Project-URL: Repository, https://github.com/SugimotoKohei/qmrpy
6
+ Project-URL: Issues, https://github.com/SugimotoKohei/qmrpy/issues
7
+ Author: Kohei Sugimoto
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: MRI,diffusion,qMRI,qMRLab,relaxometry
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: numpy>=1.26
19
+ Requires-Dist: scipy>=1.11
20
+ Provides-Extra: dev
21
+ Requires-Dist: nbclient>=0.10.2; extra == 'dev'
22
+ Requires-Dist: nbformat>=5.10.4; extra == 'dev'
23
+ Requires-Dist: pytest-cov>=5; extra == 'dev'
24
+ Requires-Dist: pytest>=8; extra == 'dev'
25
+ Requires-Dist: ruff>=0.6; extra == 'dev'
26
+ Provides-Extra: viz
27
+ Requires-Dist: pandas>=2.3.3; extra == 'viz'
28
+ Requires-Dist: plotnine>=0.13; extra == 'viz'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # qmrpy
32
+
33
+ [![PyPI](https://img.shields.io/pypi/v/qmrpy.svg)](https://pypi.org/project/qmrpy/)
34
+
35
+ qMRLab(MATLAB実装)の概念・モデルを **Python** へ段階的に移植するためのリポジトリです。
36
+
37
+ 本プロジェクトは upstream の qMRLab(MIT License)に着想を得ており、モデル定義・検証方針は qMRLab を参照しつつ Python で再構成します。
38
+
39
+
40
+ ## 開発(ローカル)
41
+
42
+ 現時点では最小のパッケージ雛形のみです(今後、モデル実装を段階的に追加します)。
43
+
44
+ - `uv sync --extra viz`(可視化を含める)
45
+ - `uv sync --extra viz --extra dev`(pytest/ruff 等を含める)
46
+ - `uv run --locked -m pytest`
47
+
48
+ ## パッケージ利用
49
+
50
+ `uv` を使う場合の導入例:
51
+
52
+ ```bash
53
+ uv add qmrpy
54
+ ```
55
+
56
+ ### 最小利用例
57
+
58
+ ```python
59
+ import numpy as np
60
+ from qmrpy.models.t1.vfa_t1 import VfaT1
61
+
62
+ model = VfaT1(
63
+ tr_s=0.015,
64
+ flip_angles_deg=np.array([2, 5, 10, 15]),
65
+ )
66
+
67
+ signal = model.forward(m0=1.0, t1_s=1.2)
68
+ fit = model.fit_linear(signal)
69
+ print(fit["t1_s"], fit["m0"])
70
+ ```
71
+
72
+ ## ライセンス
73
+
74
+ - `qmrpy` 本体:MIT(`LICENSE`)
75
+ - 参照元 `qMRLab/`:MIT(upstream、ローカル参照用)
76
+ - 翻訳・参考実装・vendor の詳細は `THIRD_PARTY_NOTICES.md` を参照
77
+
78
+ ## 第三者由来コードの扱い
79
+
80
+ - `qMRLab`(MATLAB)および `DECAES.jl` の概念・アルゴリズムを翻訳/再構成しています。
81
+ - `epgpy` は `src/epgpy/` に vendor しています。
82
+ - ライセンス表記・出自は `THIRD_PARTY_NOTICES.md` に集約しています。
qmrpy-0.1.2/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # qmrpy
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/qmrpy.svg)](https://pypi.org/project/qmrpy/)
4
+
5
+ qMRLab(MATLAB実装)の概念・モデルを **Python** へ段階的に移植するためのリポジトリです。
6
+
7
+ 本プロジェクトは upstream の qMRLab(MIT License)に着想を得ており、モデル定義・検証方針は qMRLab を参照しつつ Python で再構成します。
8
+
9
+
10
+ ## 開発(ローカル)
11
+
12
+ 現時点では最小のパッケージ雛形のみです(今後、モデル実装を段階的に追加します)。
13
+
14
+ - `uv sync --extra viz`(可視化を含める)
15
+ - `uv sync --extra viz --extra dev`(pytest/ruff 等を含める)
16
+ - `uv run --locked -m pytest`
17
+
18
+ ## パッケージ利用
19
+
20
+ `uv` を使う場合の導入例:
21
+
22
+ ```bash
23
+ uv add qmrpy
24
+ ```
25
+
26
+ ### 最小利用例
27
+
28
+ ```python
29
+ import numpy as np
30
+ from qmrpy.models.t1.vfa_t1 import VfaT1
31
+
32
+ model = VfaT1(
33
+ tr_s=0.015,
34
+ flip_angles_deg=np.array([2, 5, 10, 15]),
35
+ )
36
+
37
+ signal = model.forward(m0=1.0, t1_s=1.2)
38
+ fit = model.fit_linear(signal)
39
+ print(fit["t1_s"], fit["m0"])
40
+ ```
41
+
42
+ ## ライセンス
43
+
44
+ - `qmrpy` 本体:MIT(`LICENSE`)
45
+ - 参照元 `qMRLab/`:MIT(upstream、ローカル参照用)
46
+ - 翻訳・参考実装・vendor の詳細は `THIRD_PARTY_NOTICES.md` を参照
47
+
48
+ ## 第三者由来コードの扱い
49
+
50
+ - `qMRLab`(MATLAB)および `DECAES.jl` の概念・アルゴリズムを翻訳/再構成しています。
51
+ - `epgpy` は `src/epgpy/` に vendor しています。
52
+ - ライセンス表記・出自は `THIRD_PARTY_NOTICES.md` に集約しています。
@@ -0,0 +1,107 @@
1
+ # Third-Party Notices
2
+
3
+ このリポジトリには、第三者が著作権を有するソフトウェアの **同梱(vendor)** および
4
+ **翻訳・参考実装** が含まれます。配布物(wheel / sdist)には、各ライセンス条項に従い
5
+ 必要な表記を含めます。
6
+
7
+ ## epgpy
8
+
9
+ - Upstream: `epgpy`(Extended-Phase Graph (EPG) algorithm and extensions)
10
+ - Copyright (c) 2023, py-baudin
11
+ - License: BSD 3-Clause License
12
+ - Vendored path: `src/epgpy/`
13
+
14
+ ```
15
+ BSD 3-Clause License
16
+
17
+ Copyright (c) 2023, py-baudin
18
+
19
+ Redistribution and use in source and binary forms, with or without
20
+ modification, are permitted provided that the following conditions are met:
21
+
22
+ 1. Redistributions of source code must retain the above copyright notice, this
23
+ list of conditions and the following disclaimer.
24
+
25
+ 2. Redistributions in binary form must reproduce the above copyright notice,
26
+ this list of conditions and the following disclaimer in the documentation
27
+ and/or other materials provided with the distribution.
28
+
29
+ 3. Neither the name of the copyright holder nor the names of its
30
+ contributors may be used to endorse or promote products derived from
31
+ this software without specific prior written permission.
32
+
33
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
34
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
37
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
39
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
40
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
41
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
42
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
+ ```
44
+
45
+ ## qMRLab
46
+
47
+ - Upstream: `qMRLab`(MATLAB 実装)
48
+ - Copyright (c) 2017 NeuroPoly
49
+ - License: MIT License
50
+ - Reference path: `qMRLab/`(ローカル参照用・Git 管理外)
51
+ - Notes: 本リポジトリは qMRLab の概念・モデル定義を **翻訳/再構成** しています。
52
+ qMRLab 本体や `External/` 配下の第三者コードは同梱しておらず、取り込みが発生した場合は
53
+ その都度ライセンス表記を追加します。
54
+
55
+ ```
56
+ MIT License
57
+
58
+ Copyright (c) 2017 NeuroPoly
59
+
60
+ Permission is hereby granted, free of charge, to any person obtaining a copy
61
+ of this software and associated documentation files (the "Software"), to deal
62
+ in the Software without restriction, including without limitation the rights
63
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64
+ copies of the Software, and to permit persons to whom the Software is
65
+ furnished to do so, subject to the following conditions:
66
+
67
+ The above copyright notice and this permission notice shall be included in all
68
+ copies or substantial portions of the Software.
69
+
70
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
76
+ SOFTWARE.
77
+ ```
78
+
79
+ ## DECAES.jl
80
+
81
+ - Upstream: `DECAES.jl`
82
+ - Copyright (c) 2019 Jonathan Doucette
83
+ - License: MIT License
84
+ - Reference path: `DECAES.jl/`(ローカル参照用)
85
+ - Notes: 一部アルゴリズム/実装の **翻訳・参考** を含む
86
+
87
+ ```
88
+ Copyright (c) 2019 Jonathan Doucette
89
+
90
+ Permission is hereby granted, free of charge, to any person obtaining a copy
91
+ of this software and associated documentation files (the "Software"), to deal
92
+ in the Software without restriction, including without limitation the rights
93
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
94
+ copies of the Software, and to permit persons to whom the Software is
95
+ furnished to do so, subject to the following conditions:
96
+
97
+ The above copyright notice and this permission notice shall be included in all
98
+ copies or substantial portions of the Software.
99
+
100
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
103
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
104
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
105
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
106
+ SOFTWARE.
107
+ ```
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,13 @@
1
+ [run]
2
+ tag = "b1-dam-baseline"
3
+ seed = 0
4
+ model = "b1_dam"
5
+
6
+ [b1_dam]
7
+ alpha_deg = 60.0
8
+ n_samples = 200
9
+ m0 = 1000.0
10
+ b1_range = [0.6, 1.4]
11
+ noise_model = "gaussian"
12
+ noise_sigma = 10.0
13
+
@@ -0,0 +1,21 @@
1
+ [run]
2
+ tag = "epg-backend-sweep"
3
+ seed = 0
4
+
5
+ [epg_backend_sweep]
6
+ # EPG decay curve comparison: epgpy vs decaes backends
7
+ etl = 16
8
+ te_ms = 10.0
9
+
10
+ # Grid (small by default; intended for quick diagnostics)
11
+ alpha_deg = [90.0, 120.0, 150.0, 180.0]
12
+ t1_s = [0.6, 1.0, 2.0]
13
+ t2_ms = [20.0, 30.0, 50.0, 80.0, 120.0, 200.0]
14
+ beta_deg = 180.0
15
+
16
+ # Normalization for error metrics: normalize by first echo
17
+ normalize = "first_echo"
18
+
19
+ # Failure analysis: overlay top-k worst cases
20
+ topk = 3
21
+
@@ -0,0 +1,18 @@
1
+ [run]
2
+ tag = "epg-backend-sweep-beta150"
3
+ seed = 0
4
+
5
+ [epg_backend_sweep]
6
+ etl = 16
7
+ te_ms = 10.0
8
+
9
+ alpha_deg = [90.0, 120.0, 150.0, 180.0]
10
+ t1_s = [0.6, 1.0, 2.0]
11
+ t2_ms = [20.0, 30.0, 50.0, 80.0, 120.0, 200.0]
12
+
13
+ # Non-ideal refocusing
14
+ beta_deg = 150.0
15
+
16
+ normalize = "first_echo"
17
+ topk = 3
18
+
@@ -0,0 +1,19 @@
1
+ [run]
2
+ tag = "epg-backend-sweep-wide"
3
+ seed = 0
4
+
5
+ [epg_backend_sweep]
6
+ # Broader coverage (still intended to be a quick diagnostic):
7
+ # - multiple ETL / TE / beta conditions
8
+ # - moderate grid size to keep runtime reasonable
9
+ etl = [8, 16, 32]
10
+ te_ms = [5.0, 10.0, 20.0]
11
+ beta_deg = [120.0, 150.0, 180.0]
12
+
13
+ alpha_deg = [90.0, 120.0, 150.0, 180.0]
14
+ t1_s = [0.6, 1.0, 2.0]
15
+ t2_ms = [10.0, 20.0, 30.0, 50.0, 80.0, 120.0, 200.0]
16
+
17
+ normalize = "first_echo"
18
+ topk = 5
19
+
@@ -0,0 +1,15 @@
1
+ [run]
2
+ tag = "inversion-recovery-baseline"
3
+ seed = 0
4
+ model = "inversion_recovery"
5
+
6
+ [inversion_recovery]
7
+ ti_ms = [350, 500, 650, 800, 950, 1100, 1250, 1400, 1700]
8
+ n_samples = 200
9
+ t1_range_ms = [200.0, 2000.0]
10
+ ra = 500.0
11
+ rb = -1000.0
12
+ method = "magnitude"
13
+ noise_model = "rician"
14
+ noise_sigma = 5.0
15
+
@@ -0,0 +1,15 @@
1
+ [run]
2
+ tag = "mono-t2-baseline"
3
+ seed = 0
4
+ model = "mono_t2"
5
+
6
+ [mono_t2]
7
+ te_ms = [10, 20, 40, 80, 160]
8
+ n_samples = 200
9
+ m0 = 1000.0
10
+ t2_range_ms = [20.0, 200.0]
11
+ noise_model = "gaussian"
12
+ noise_sigma = 5.0
13
+ fit_type = "exponential"
14
+ drop_first_echo = false
15
+ offset_term = false
@@ -0,0 +1,26 @@
1
+ [run]
2
+ tag = "mwf-baseline"
3
+ seed = 0
4
+ model = "mwf"
5
+
6
+ [mwf]
7
+ # Standard CPMG-like protocol: 32 echos, 10ms spacing
8
+ te_ms = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320]
9
+ n_samples = 100
10
+ m0 = 1000.0
11
+ mwf_ref = 0.15
12
+ t2_myelin_ms = 20.0
13
+ t2_ie_ms = 80.0
14
+ # qMRLab-like cutoffs
15
+ # - lower_cutoff_mw_ms: default None -> 1.5 * FirstEcho
16
+ cutoff_ms = 40.0
17
+ upper_cutoff_iew_ms = 200.0
18
+
19
+ # NNLS T2 basis (log-spaced)
20
+ t2_basis_range_ms = [10.0, 2000.0]
21
+ t2_basis_n = 40
22
+ use_weighted_geometric_mean = false
23
+
24
+ noise_model = "gaussian"
25
+ noise_sigma = 2.0 # SNR ~ 500
26
+ regularization_alpha = 0.001
@@ -0,0 +1,11 @@
1
+ [run]
2
+ name = "mppca_demo"
3
+ seed = 42
4
+
5
+ [mppca]
6
+ sx = 30
7
+ sy = 30
8
+ sz = 10
9
+ n_vol = 30
10
+ snr = 20.0
11
+ kernel = [5, 5, 5]
@@ -0,0 +1,18 @@
1
+ [run]
2
+ tag = "vfa-t1-b1range-gaussian"
3
+ seed = 0
4
+ model = "vfa_t1"
5
+
6
+ [vfa_t1]
7
+ flip_angle_deg = [3, 8, 15, 25]
8
+ tr_s = 0.015
9
+ n_samples = 200
10
+ m0 = 2000.0
11
+ t1_range_s = [0.2, 2.0]
12
+ b1_range = [0.8, 1.2]
13
+ noise_model = "gaussian"
14
+ noise_sigma = 5.0
15
+ robust_linear = false
16
+ huber_k = 1.345
17
+ outlier_reject = false
18
+
@@ -0,0 +1,18 @@
1
+ [run]
2
+ tag = "vfa-t1-b1range-rician-outlier"
3
+ seed = 0
4
+ model = "vfa_t1"
5
+
6
+ [vfa_t1]
7
+ flip_angle_deg = [3, 8, 15, 25]
8
+ tr_s = 0.015
9
+ n_samples = 200
10
+ m0 = 2000.0
11
+ t1_range_s = [0.2, 2.0]
12
+ b1_range = [0.8, 1.2]
13
+ noise_model = "rician"
14
+ noise_sigma = 5.0
15
+ robust_linear = true
16
+ huber_k = 1.345
17
+ outlier_reject = true
18
+
@@ -0,0 +1,17 @@
1
+ [run]
2
+ tag = "vfa-t1-baseline"
3
+ seed = 0
4
+ model = "vfa_t1"
5
+
6
+ [vfa_t1]
7
+ flip_angle_deg = [3, 8, 15, 25]
8
+ tr_s = 0.015
9
+ n_samples = 200
10
+ m0 = 2000.0
11
+ t1_range_s = [0.2, 2.0]
12
+ b1 = 1.0
13
+ noise_model = "gaussian"
14
+ noise_sigma = 5.0
15
+ robust_linear = false
16
+ huber_k = 1.345
17
+ outlier_reject = false
@@ -0,0 +1,18 @@
1
+ [run]
2
+ tag = "vfa-t1-rician"
3
+ seed = 0
4
+ model = "vfa_t1"
5
+
6
+ [vfa_t1]
7
+ flip_angle_deg = [3, 8, 15, 25]
8
+ tr_s = 0.015
9
+ n_samples = 200
10
+ m0 = 2000.0
11
+ t1_range_s = [0.2, 2.0]
12
+ b1 = 1.0
13
+ noise_model = "rician"
14
+ noise_sigma = 5.0
15
+ robust_linear = false
16
+ huber_k = 1.345
17
+ outlier_reject = false
18
+
@@ -0,0 +1 @@
1
+