pulserver 0.1.0__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 (110) hide show
  1. pulserver-0.1.0/.github/workflows/style.yml +44 -0
  2. pulserver-0.1.0/.github/workflows/tags-release.yml +120 -0
  3. pulserver-0.1.0/.github/workflows/test-cicd.yml +65 -0
  4. pulserver-0.1.0/.gitignore +26 -0
  5. pulserver-0.1.0/LICENSE.txt +21 -0
  6. pulserver-0.1.0/PKG-INFO +95 -0
  7. pulserver-0.1.0/README.rst +53 -0
  8. pulserver-0.1.0/docs/Makefile +20 -0
  9. pulserver-0.1.0/docs/_templates/autosummary/base.rst +5 -0
  10. pulserver-0.1.0/docs/_templates/autosummary/class.rst +32 -0
  11. pulserver-0.1.0/docs/_templates/autosummary/function.rst +10 -0
  12. pulserver-0.1.0/docs/_templates/autosummary/module.rst +64 -0
  13. pulserver-0.1.0/docs/api.rst +67 -0
  14. pulserver-0.1.0/docs/binder/apt.txt +3 -0
  15. pulserver-0.1.0/docs/binder/environment.yml +9 -0
  16. pulserver-0.1.0/docs/client_server_architecture +0 -0
  17. pulserver-0.1.0/docs/conf.py +137 -0
  18. pulserver-0.1.0/docs/getting_started.rst +21 -0
  19. pulserver-0.1.0/docs/hands-on.ipynb +825 -0
  20. pulserver-0.1.0/docs/index.rst +40 -0
  21. pulserver-0.1.0/docs/misc/code_of_conduct.rst +138 -0
  22. pulserver-0.1.0/docs/misc/contributors.rst +10 -0
  23. pulserver-0.1.0/docs/misc/development.rst +40 -0
  24. pulserver-0.1.0/docs/misc/license.rst +4 -0
  25. pulserver-0.1.0/docs/requirements.txt +6 -0
  26. pulserver-0.1.0/docs/sequence_representation +0 -0
  27. pulserver-0.1.0/docs/sg_execution_times.rst +58 -0
  28. pulserver-0.1.0/docs/sphinx_add_colab_link.py +161 -0
  29. pulserver-0.1.0/pyproject.toml +125 -0
  30. pulserver-0.1.0/setup.cfg +4 -0
  31. pulserver-0.1.0/setup.py +3 -0
  32. pulserver-0.1.0/src/pulserver/__init__.py +17 -0
  33. pulserver-0.1.0/src/pulserver/_apps/SPGR2D.py +206 -0
  34. pulserver-0.1.0/src/pulserver/_apps/SPGR3D.py +184 -0
  35. pulserver-0.1.0/src/pulserver/_apps/bar.py +15 -0
  36. pulserver-0.1.0/src/pulserver/_apps/foo.py +15 -0
  37. pulserver-0.1.0/src/pulserver/_cli.py +70 -0
  38. pulserver-0.1.0/src/pulserver/_core/__init__.py +12 -0
  39. pulserver-0.1.0/src/pulserver/_core/_autoseg.py +128 -0
  40. pulserver-0.1.0/src/pulserver/_core/_ceq.py +541 -0
  41. pulserver-0.1.0/src/pulserver/_core/_sequence.py +313 -0
  42. pulserver-0.1.0/src/pulserver/_server/__init__.py +6 -0
  43. pulserver-0.1.0/src/pulserver/_server/_server.py +197 -0
  44. pulserver-0.1.0/src/pulserver/_version.py +16 -0
  45. pulserver-0.1.0/src/pulserver/blocks/__init__.py +16 -0
  46. pulserver-0.1.0/src/pulserver/blocks/_grad/_make_spiral.py +201 -0
  47. pulserver-0.1.0/src/pulserver/blocks/_misc/__init__.py +7 -0
  48. pulserver-0.1.0/src/pulserver/blocks/_misc/_make_spoiler_gradient.py +64 -0
  49. pulserver-0.1.0/src/pulserver/blocks/_phaseenc/__init__.py +7 -0
  50. pulserver-0.1.0/src/pulserver/blocks/_phaseenc/_make_phase_blip.py +0 -0
  51. pulserver-0.1.0/src/pulserver/blocks/_phaseenc/_make_phase_encoding.py +49 -0
  52. pulserver-0.1.0/src/pulserver/blocks/_readout/__init__.py +9 -0
  53. pulserver-0.1.0/src/pulserver/blocks/_readout/_make_line_readout.py +149 -0
  54. pulserver-0.1.0/src/pulserver/blocks/_readout/_make_spiral_readout.py +105 -0
  55. pulserver-0.1.0/src/pulserver/blocks/_readout/rosette_readout.py +6 -0
  56. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/__init__.py +221 -0
  57. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_make_spsp_pulse.py +196 -0
  58. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_plot.py +164 -0
  59. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/__init__.py +11 -0
  60. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/_slr.py +444 -0
  61. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/_utils.py +99 -0
  62. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/rf_ripple.py +75 -0
  63. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/spec_interp.py +35 -0
  64. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_alias.py +316 -0
  65. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_design.py +493 -0
  66. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_ep.py +332 -0
  67. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_filters.py +2079 -0
  68. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_flyback.py +441 -0
  69. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_fourier.py +90 -0
  70. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_globals.py +43 -0
  71. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_grad.py +239 -0
  72. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_spect_correct.py +57 -0
  73. pulserver-0.1.0/src/pulserver/blocks/_rfpulse/_spsp/ss_verse.py +166 -0
  74. pulserver-0.1.0/src/pulserver/plan/__init__.py +32 -0
  75. pulserver-0.1.0/src/pulserver/plan/_cartesian2D.py +151 -0
  76. pulserver-0.1.0/src/pulserver/plan/_cartesian3D.py +157 -0
  77. pulserver-0.1.0/src/pulserver/plan/_iterators/__init__.py +19 -0
  78. pulserver-0.1.0/src/pulserver/plan/_iterators/_base.py +69 -0
  79. pulserver-0.1.0/src/pulserver/plan/_iterators/_cartesian2D_iterator.py +173 -0
  80. pulserver-0.1.0/src/pulserver/plan/_iterators/_cartesian3D_iterator.py +137 -0
  81. pulserver-0.1.0/src/pulserver/plan/_iterators/_noncartesian2D_iterator.py +174 -0
  82. pulserver-0.1.0/src/pulserver/plan/_iterators/_noncartesian3D_iterator.py +119 -0
  83. pulserver-0.1.0/src/pulserver/plan/_iterators/_stack3D_iterator.py +173 -0
  84. pulserver-0.1.0/src/pulserver/plan/_noncartesian2D.py +139 -0
  85. pulserver-0.1.0/src/pulserver/plan/_noncartesian3D.py +94 -0
  86. pulserver-0.1.0/src/pulserver/plan/_ordering.py +55 -0
  87. pulserver-0.1.0/src/pulserver/plan/_phase_cycling.py +87 -0
  88. pulserver-0.1.0/src/pulserver/plan/_sampling/__init__.py +14 -0
  89. pulserver-0.1.0/src/pulserver/plan/_sampling/_grid_sampling.py +180 -0
  90. pulserver-0.1.0/src/pulserver/plan/_sampling/_partial_fourier.py +52 -0
  91. pulserver-0.1.0/src/pulserver/plan/_sampling/_poisson_sampling.py +275 -0
  92. pulserver-0.1.0/src/pulserver/plan/_sampling/_tilt.py +48 -0
  93. pulserver-0.1.0/src/pulserver/plan/_stack3D.py +136 -0
  94. pulserver-0.1.0/src/pulserver/sequences/__init__.py +5 -0
  95. pulserver-0.1.0/src/pulserver/sequences/_design_2D_spgr.py +211 -0
  96. pulserver-0.1.0/src/pulserver/sequences/_design_3D_spgr.py +184 -0
  97. pulserver-0.1.0/src/pulserver.egg-info/PKG-INFO +95 -0
  98. pulserver-0.1.0/src/pulserver.egg-info/SOURCES.txt +108 -0
  99. pulserver-0.1.0/src/pulserver.egg-info/dependency_links.txt +1 -0
  100. pulserver-0.1.0/src/pulserver.egg-info/requires.txt +26 -0
  101. pulserver-0.1.0/src/pulserver.egg-info/top_level.txt +1 -0
  102. pulserver-0.1.0/tests/_core/test_autoseg.py +531 -0
  103. pulserver-0.1.0/tests/_core/test_ceq.py +167 -0
  104. pulserver-0.1.0/tests/_core/test_seqparams.py +110 -0
  105. pulserver-0.1.0/tests/_core/test_sequence.py +141 -0
  106. pulserver-0.1.0/tests/_server/test_server.py +508 -0
  107. pulserver-0.1.0/tests/helpers/__init__.py +5 -0
  108. pulserver-0.1.0/tests/helpers/asserts.py +55 -0
  109. pulserver-0.1.0/tests/plan/test_cartesian.py +157 -0
  110. pulserver-0.1.0/tests/plan/test_noncartesian.py +314 -0
@@ -0,0 +1,44 @@
1
+ name: Style
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+
10
+ workflow_dispatch:
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ env:
17
+ PYTHON_VERSION: "3.10"
18
+
19
+ jobs:
20
+ linter-check:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v3
25
+ - name: Set up Python ${{ env.PYTHON_VERSION }}
26
+ uses: actions/setup-python@v4
27
+ with:
28
+ python-version: ${{ env.PYTHON_VERSION }}
29
+ cache: pip
30
+
31
+ - name: Install Python deps
32
+ shell: bash
33
+ run: |
34
+ python -m pip install --upgrade pip
35
+ python -m pip install black ruff
36
+ python -m pip install -e .
37
+
38
+ - name: Black Check
39
+ shell: bash
40
+ run: black . --diff --color --check
41
+
42
+ # - name: ruff Check
43
+ # shell: bash
44
+ # run: ruff check src
@@ -0,0 +1,120 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]+.[0-9]+.[0-9]+'
7
+
8
+ jobs:
9
+ build:
10
+ name: Build distribution 📦
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.x"
19
+ - name: Install pypa/build
20
+ run: >-
21
+ python3 -m
22
+ pip install
23
+ build
24
+ --user
25
+ - name: Build a binary wheel and a source tarball
26
+ run: python3 -m build
27
+ - name: Store the distribution packages
28
+ uses: actions/upload-artifact@v4
29
+ with:
30
+ name: python-package-distributions
31
+ path: dist/
32
+
33
+ publish-to-pypi:
34
+ name: >-
35
+ Publish Python 🐍 distribution 📦 to PyPI
36
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
37
+ needs:
38
+ - build
39
+ runs-on: ubuntu-latest
40
+ environment:
41
+ name: pypi
42
+ url: https://pypi.org/p/<package-name> # Replace <package-name> with your PyPI project name
43
+ permissions:
44
+ id-token: write # IMPORTANT: mandatory for trusted publishing
45
+
46
+ steps:
47
+ - name: Download all the dists
48
+ uses: actions/download-artifact@v4
49
+ with:
50
+ name: python-package-distributions
51
+ path: dist/
52
+ - name: Publish distribution 📦 to PyPI
53
+ uses: pypa/gh-action-pypi-publish@release/v1
54
+
55
+ github-release:
56
+ name: >-
57
+ Sign the Python 🐍 distribution 📦 with Sigstore
58
+ and upload them to GitHub Release
59
+ needs:
60
+ - publish-to-pypi
61
+ runs-on: ubuntu-latest
62
+
63
+ permissions:
64
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
65
+ id-token: write # IMPORTANT: mandatory for sigstore
66
+
67
+ steps:
68
+ - name: Download all the dists
69
+ uses: actions/download-artifact@v4
70
+ with:
71
+ name: python-package-distributions
72
+ path: dist/
73
+ - name: Sign the dists with Sigstore
74
+ uses: sigstore/gh-action-sigstore-python@v2.1.1
75
+ with:
76
+ inputs: >-
77
+ ./dist/*.tar.gz
78
+ ./dist/*.whl
79
+ - name: Create GitHub Release
80
+ env:
81
+ GITHUB_TOKEN: ${{ github.token }}
82
+ run: >-
83
+ gh release create
84
+ '${{ github.ref_name }}'
85
+ --repo '${{ github.repository }}'
86
+ --notes ""
87
+ - name: Upload artifact signatures to GitHub Release
88
+ env:
89
+ GITHUB_TOKEN: ${{ github.token }}
90
+ # Upload to GitHub Release using the `gh` CLI.
91
+ # `dist/` contains the built packages, and the
92
+ # sigstore-produced signatures and certificates.
93
+ run: >-
94
+ gh release upload
95
+ '${{ github.ref_name }}' dist/**
96
+ --repo '${{ github.repository }}'
97
+
98
+ publish-to-testpypi:
99
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
100
+ needs:
101
+ - build
102
+ runs-on: ubuntu-latest
103
+
104
+ environment:
105
+ name: testpypi
106
+ url: https://test.pypi.org/p/<package-name>
107
+
108
+ permissions:
109
+ id-token: write # IMPORTANT: mandatory for trusted publishing
110
+
111
+ steps:
112
+ - name: Download all the dists
113
+ uses: actions/download-artifact@v4
114
+ with:
115
+ name: python-package-distributions
116
+ path: dist/
117
+ - name: Publish distribution 📦 to TestPyPI
118
+ uses: pypa/gh-action-pypi-publish@release/v1
119
+ with:
120
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,65 @@
1
+ name: CI/CD
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ needs: [test]
13
+
14
+ strategy:
15
+ matrix:
16
+ python-version: [3.10, 3.12] # Specify the desired Python versions
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ pip install .[test]
30
+
31
+ - name: Run tests
32
+ run: pytest --cov --cov-report=xml tests
33
+
34
+ - name: Upload coverage reports to Codecov
35
+ uses: codecov/codecov-action@v4.0.1
36
+ with:
37
+ token: ${{ secrets.CODECOV_TOKEN }}
38
+ slug: INFN-MRI/pulserver
39
+
40
+ docs:
41
+ runs-on: ubuntu-20.04
42
+ needs: [test]
43
+ steps:
44
+ - name: Get the docs_build artifact
45
+ uses: actions/download-artifact@v4
46
+ with:
47
+ name: docs_final
48
+ path: docs_build
49
+ run-id: ${{ github.event.workflow_run.id }}
50
+ github-token: ${{ secrets.GITHUB_TOKEN }}
51
+
52
+ - name: Display structure of docs
53
+ run: ls -R docs_build/
54
+
55
+ - name: Deploy to GitHub Pages
56
+ uses: peaceiris/actions-gh-pages@v4
57
+ with:
58
+ github_token: ${{ secrets.GITHUB_TOKEN }}
59
+ publish_dir: ./docs_build
60
+ destination_dir: . # Ensure you deploy to the root of the gh-pages branch
61
+ publish_branch: gh-pages
62
+ keep_files: false
63
+
64
+
65
+
@@ -0,0 +1,26 @@
1
+ *.npy
2
+ build/
3
+ dist/
4
+ *.egg-info/
5
+ **/.ipynb_checkpoints/
6
+ examples/*.ipynb
7
+ *.xml
8
+ .coverage*
9
+ .vscode
10
+
11
+
12
+ .idea
13
+ *.log
14
+ tmp/
15
+
16
+ *_cache/
17
+ *.py[cod]
18
+ *.egg
19
+ *.nbi
20
+ *.nbc
21
+
22
+ docs/generated/
23
+ docs_build/
24
+ jupyter_execute/
25
+
26
+ src/pulserver/_version.py
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Matteo Cencini
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.
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.1
2
+ Name: pulserver
3
+ Version: 0.1.0
4
+ Summary: A PyPulseq-based client/server MR sequence design toolbox.
5
+ Author-email: Matteo Cencini <matteo.cencini@gmail.com>
6
+ Project-URL: Homepage, https://github.com/INFN-MRI/pulserver
7
+ Project-URL: Bug Reports, https://github.com/INFN-MRI/pulserver/issues
8
+ Project-URL: Source, https://github.com/INFN-MRI/pulserver
9
+ Keywords: pulseq,mri,sequence-design,pulse-sequences,mri-sequences
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/x-rst
18
+ License-File: LICENSE.txt
19
+ Requires-Dist: numpy<2.0
20
+ Requires-Dist: scipy<1.14
21
+ Requires-Dist: numba
22
+ Requires-Dist: pypulseq
23
+ Requires-Dist: pulpy
24
+ Requires-Dist: mri-nufft
25
+ Requires-Dist: ismrmrd
26
+ Requires-Dist: ipywidgets
27
+ Provides-Extra: dev
28
+ Requires-Dist: black; extra == "dev"
29
+ Requires-Dist: isort; extra == "dev"
30
+ Provides-Extra: test
31
+ Requires-Dist: pytest; extra == "test"
32
+ Requires-Dist: pytest-black; extra == "test"
33
+ Requires-Dist: pytest-cov; extra == "test"
34
+ Requires-Dist: pytest-sugar; extra == "test"
35
+ Requires-Dist: pytest-xdist; extra == "test"
36
+ Provides-Extra: doc
37
+ Requires-Dist: sphinx; extra == "doc"
38
+ Requires-Dist: pydata-sphinx-theme; extra == "doc"
39
+ Requires-Dist: myst-nb; extra == "doc"
40
+ Requires-Dist: matplotlib; extra == "doc"
41
+ Requires-Dist: mrtwin; extra == "doc"
42
+
43
+ Pulserver
44
+ =========
45
+
46
+ Pulserver is a high-level wrapper over PyPulseq. It is designed to
47
+ improve MR sequence code organization and provide a bridge
48
+ between different Pulseq interpreter representations while providing
49
+ a familiar interface to PyPulseq user.
50
+
51
+ It also provide a server-based interface to enable online sequence design
52
+ routines, e.g., using the MR scanner as a client.
53
+
54
+ Features
55
+ --------
56
+
57
+
58
+
59
+ Installation
60
+ ------------
61
+ Pulserver can be installed via pip:
62
+
63
+ .. code-block:: bash
64
+
65
+ pip install pulserver
66
+
67
+ Development
68
+ -----------
69
+ If you want to modifiy the Pulserver code base:
70
+
71
+ .. code-block:: bash
72
+
73
+ git clone https://github.com/INFN-MRI/pulservert.git
74
+ pip install -e ./pulserver
75
+
76
+ Usage
77
+ -----
78
+
79
+ TODO: add quick example
80
+
81
+ Testing
82
+ -------
83
+ To run the tests, execute the following command in the terminal:
84
+
85
+ .. code-block:: bash
86
+
87
+ pytest .
88
+
89
+ License
90
+ -------
91
+ This project is licensed under the MIT License.
92
+
93
+ Contributing
94
+ ------------
95
+ Contributions are welcome! Please fork the repository and submit a pull request.
@@ -0,0 +1,53 @@
1
+ Pulserver
2
+ =========
3
+
4
+ Pulserver is a high-level wrapper over PyPulseq. It is designed to
5
+ improve MR sequence code organization and provide a bridge
6
+ between different Pulseq interpreter representations while providing
7
+ a familiar interface to PyPulseq user.
8
+
9
+ It also provide a server-based interface to enable online sequence design
10
+ routines, e.g., using the MR scanner as a client.
11
+
12
+ Features
13
+ --------
14
+
15
+
16
+
17
+ Installation
18
+ ------------
19
+ Pulserver can be installed via pip:
20
+
21
+ .. code-block:: bash
22
+
23
+ pip install pulserver
24
+
25
+ Development
26
+ -----------
27
+ If you want to modifiy the Pulserver code base:
28
+
29
+ .. code-block:: bash
30
+
31
+ git clone https://github.com/INFN-MRI/pulservert.git
32
+ pip install -e ./pulserver
33
+
34
+ Usage
35
+ -----
36
+
37
+ TODO: add quick example
38
+
39
+ Testing
40
+ -------
41
+ To run the tests, execute the following command in the terminal:
42
+
43
+ .. code-block:: bash
44
+
45
+ pytest .
46
+
47
+ License
48
+ -------
49
+ This project is licensed under the MIT License.
50
+
51
+ Contributing
52
+ ------------
53
+ Contributions are welcome! Please fork the repository and submit a pull request.
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,5 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. auto{{ objtype }}:: {{ objname }}
@@ -0,0 +1,32 @@
1
+ {{ name | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autoclass:: {{ objname }}
6
+ :members:
7
+ :private-members:
8
+ :show-inheritance:
9
+ :special-members: __call__, __add__, __mul__, __matmul__
10
+
11
+ {% block methods %}
12
+ {% if methods %}
13
+ .. rubric:: {{ _('Methods') }}
14
+
15
+ .. autosummary::
16
+ :nosignatures:
17
+ {% for item in methods %}
18
+ ~{{ name }}.{{ item }}
19
+ {%- endfor %}
20
+ {% endif %}
21
+ {% endblock %}
22
+
23
+ {% block attributes %}
24
+ {% if attributes %}
25
+ .. rubric:: {{ _('Attributes') }}
26
+
27
+ .. autosummary::
28
+ {% for item in attributes %}
29
+ ~{{ name }}.{{ item }}
30
+ {%- endfor %}
31
+ {% endif %}
32
+ {% endblock %}
@@ -0,0 +1,10 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autofunction:: {{ objname }}
6
+
7
+ .. _sphx_glr_backref_{{fullname}}:
8
+
9
+ .. minigallery:: {{fullname}}
10
+ :add-heading:
@@ -0,0 +1,64 @@
1
+ {{ "``{}.{}``".format(module.split(".")[-1], objname) | underline}}
2
+
3
+ .. automodule:: {{ fullname }}
4
+
5
+ {% block attributes %}
6
+ {% if attributes %}
7
+ .. rubric:: Module attributes
8
+
9
+ .. autosummary::
10
+ :toctree:
11
+ {% for item in attributes %}
12
+ {{ item }}
13
+ {%- endfor %}
14
+ {% endif %}
15
+ {% endblock %}
16
+
17
+ {% block functions %}
18
+ {% if functions %}
19
+ .. rubric:: {{ _('Functions') }}
20
+
21
+ .. autosummary::
22
+ :toctree:
23
+ :nosignatures:
24
+ {% for item in functions %}
25
+ {{ item }}
26
+ {%- endfor %}
27
+ {% endif %}
28
+ {% endblock %}
29
+
30
+ {% block classes %}
31
+ {% if classes %}
32
+ .. rubric:: {{ _('Classes') }}
33
+
34
+ .. autosummary::
35
+ :toctree:
36
+ :nosignatures:
37
+ {% for item in classes %}
38
+ {{ item }}
39
+ {%- endfor %}
40
+ {% endif %}
41
+ {% endblock %}
42
+
43
+ {% block exceptions %}
44
+ {% if exceptions %}
45
+ .. rubric:: {{ _('Exceptions') }}
46
+
47
+ .. autosummary::
48
+ :toctree:
49
+ {% for item in exceptions %}
50
+ {{ item }}
51
+ {%- endfor %}
52
+ {% endif %}
53
+ {% endblock %}
54
+
55
+ {% block modules %}
56
+ {% if modules %}
57
+ .. autosummary::
58
+ :toctree:
59
+ :recursive:
60
+ {% for item in modules %}
61
+ {{ item }}
62
+ {%- endfor %}
63
+ {% endif %}
64
+ {% endblock %}
@@ -0,0 +1,67 @@
1
+ API References
2
+ ==============
3
+
4
+ Core
5
+ ----
6
+ Core sequence representation.
7
+
8
+ .. autosummary::
9
+ :toctree: generated
10
+ :nosignatures:
11
+
12
+ pulserver.Sequence
13
+ pulserver.SequenceParams
14
+ pulserver.Opts
15
+
16
+ Blocks
17
+ ------
18
+ Subroutines for the generation of sequence blocks, e.g.,
19
+ preparation modules, rf pulses, phase encoding, readout.
20
+
21
+ RF Pulses
22
+ ^^^^^^^^^
23
+ Non-adiabatic RF pulses blocks, including both the RF events
24
+ and (for spatially-selective pulses), the accompanying gradient event.
25
+
26
+ .. autosummary::
27
+ :toctree: generated
28
+ :nosignatures:
29
+
30
+ pulserver.blocks.make_hard_pulse
31
+ pulserver.blocks.make_slr_pulse
32
+ pulserver.blocks.make_spsp_pulse
33
+
34
+ Readout
35
+ ^^^^^^^
36
+ Readout blocks, including both the gradient (either trapezoidal or arbitrary, e.g., for spiral imaging),
37
+ and the accompanying adc events.
38
+
39
+ .. autosummary::
40
+ :toctree: generated
41
+ :nosignatures:
42
+
43
+ pulserver.blocks.make_line_readout
44
+ pulserver.blocks.make_spiral_readout
45
+
46
+ Phase Encoding
47
+ ^^^^^^^^^^^^^^
48
+ Phase encoding blocks, including phase blips for EPI sampling.
49
+
50
+ .. autosummary::
51
+ :toctree: generated
52
+ :nosignatures:
53
+
54
+ pulserver.blocks.make_phase_encoding
55
+
56
+ Miscellaneous
57
+ ^^^^^^^^^^^^^
58
+ Miscellaneous blocks such as gradient spoiling.
59
+
60
+ .. autosummary::
61
+ :toctree: generated
62
+ :nosignatures:
63
+
64
+ pulserver.blocks.make_spoiler_gradient
65
+
66
+
67
+
@@ -0,0 +1,3 @@
1
+ cmake
2
+ libnfft3-dev
3
+ libgl1-mesa-glx
@@ -0,0 +1,9 @@
1
+ name: mrtwin
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - python=3.10
6
+ - pip>=19.1.1
7
+ - jupyter>=1.0.0
8
+ - pip:
9
+ - mrtwin
File without changes