GASP: Generation of Arbitrary Spectral Profiles
Overview
GASP (Generation of Arbitrary Spectral Profiles) is a Python library for simulating and analyzing MRI sequences, particularly focused on balanced Steady-State Free Precession (bSSFP) and spectral shaping techniques. This project provides tools for simulating MRI signals, generating phantoms, and applying the GASP method to achieve desired spectral profiles.
Features
- Simulation of bSSFP sequences
- Generation of various phantom types (e.g., Shepp-Logan, circles, blocks)
- Implementation of the GASP method for spectral shaping
- Tools for analyzing and visualizing MRI data
- Support for different tissue types and their relaxation properties
Development
This project requires python 3.8+ and has the following dependancies:
numpy matplotlib scikit-image seaborn pymapvbvd jupyterlab gdown scipy
To setup a local python enviroment with conda:
Create a new conda environment from scatch
conda create -n gasp python=3.8 conda activate gaspThen install packages with pip:
pip install numpy matplotlib scikit-image seaborn pymapvbvd jupyterlab gdown scipy
Usage
Here's a basic example of how to use the GASP simulation:
from gasp import simulation, responses
# Set up simulation parameters
width, height = 256, 256
npcs = 16
TRs = [5e-3, 10e-3, 20e-3]
alpha = np.deg2rad(60)
gradient = 2 * np.pi
# Create a desired spectral profile
D = responses.gaussian(width, bw=0.2, shift=0)
# Simulate GASP
Ic, M, An = simulation.simulate_gasp(D, width, height, npcs, TRs, alpha, gradient)
# Visualize results
simulation.view_gasp_results(Ic, M, D)
Modules
analysis.py: Contains functions for analyzing GASP results and Dixon methodsdataloader.py: Handles loading of raw MRI datadataset.py: Provides functions to load specific datasetsgasp.py: Core implementation of the GASP methodphantom.py: Functions for generating various phantom typesresponses.py: Implements different spectral response functionssimulation.py: Main simulation routines for bSSFP and GASPssfp.py: Implementation of Steady-State Free Precession signal equationstissue.py: Defines tissue properties and generates tissue phantomsview.py: Visualization tools for 3D data
Metadata
Release files for gasp-ssfp 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gasp_ssfp-0.0.3.tar.gz | 17.6 kB | Without provenance | Details for gasp_ssfp-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gasp_ssfp-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for gasp_ssfp-0.0.3-py3-none-any.whl |
Total release size: 39.3 kB
Release files / gasp_ssfp-0.0.3.tar.gz
| Download URL | gasp_ssfp-0.0.3.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6fcba3bfcf865f1a7c37ca93ae283ad5f0731c4dbce4618c33b10d541673923
|
|
BLAKE2b-256 checksum How to use checksums |
dfbeecf48b9bfeaebc080d1798580257139fe3b498b9f31b8adf5be0f22af78d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / gasp_ssfp-0.0.3-py3-none-any.whl
| Download URL | gasp_ssfp-0.0.3-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a4c7e6465762aa7ebf4c66863fd22d6367aea17720c99ad3df5d84b427a80dc
|
|
BLAKE2b-256 checksum How to use checksums |
0203a5873e0123a375c69e4b91299364a53d7e5d579baef3fda9408bcd76a4ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Security for gasp-ssfp 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.