Skip to main content

MR system specifications for PyPulseq

Project description

PulseqSystems

PulseqSystems provides a bundled collection of MR system specifications (e.g. gradient configurations) intended to be used with pulse sequence tooling such as pypulseq.

This repository packages MRSystems.json and utilities to load/query the available manufacturers, models and gradient configurations. The primary target is pypulseq (https://github.com/imr-framework/pypulseq), but the data and utilities can be consumed from both Python and Nim projects.

Features

  • Packaged MR system specifications (JSON) for common scanner models.
  • Helpers to list manufacturers, models, gradients and to retrieve pulseq specs.
  • Designed to be installed as a Python package and used together with pypulseq.
  • Data is plain JSON and can be parsed from other languages (Nim, etc.).

Usage

Raw specifications in JSON format

  • The MRSystems.json file contains the specifications. You can parse this file directly in any language that supports JSON to access the data.
  • The file is located under src/pulseq_systems/MRSystems.json in the repository.

Python

  • Import the package and use the provided helpers to list systems and obtain pulseq-compatible parameters.
  • Typical workflow: install the package, then call functions to get gradient limits and slew rate for use with pypulseq.

Nim

  • The JSON file(s) are distributed with the package. After installation or by copying the JSON, Nim programs can parse MRSystems.json with any JSON library to obtain the same system specifications.

Python API

The package ships a small helper module (src/pulseq_systems/get_systems.py) to load and query the bundled MRSystems.json. Main functions:

  • list_manufacturers() -> list[str]
    • Return a list of manufacturer names present in MRSystems.json.
  • list_models(manufacturer: str) -> list[str]
    • Return a list of model names for a given manufacturer.
  • list_gradients(manufacturer: str, model: str) -> list[str]
    • Return available gradient configuration names for the given model.
  • get_pulseq_specs(manufacturer: str, model: str, gradient: str = None) -> dict
    • Return pulseq-relevant parameters. The returned dict includes:
      • grad_unit (e.g. "mT/m")
      • max_grad (float)
      • slew_unit (e.g. "T/m/s")
      • max_slew (float)
      • B0 (float, field strength in T)
    • If gradient is omitted, the first available gradient configuration is used.
  • get_metadata() -> dict
    • Return top-level metadata from MRSystems.json.

Example (after installing the package):

from pulseq_systems import list_manufacturers, get_pulseq_specs

manufacturers = list_manufacturers()
specs = get_pulseq_specs("Siemens", "Prisma")

Nim

A Nim module (src/pulseq_systems.nim) is provided so the same JSON data can be consumed from Nim code. The Nim module exposes:

  • listManufacturers(): seq[string]
  • listModels(manufacturer: string): seq[string]
  • listGradients(manufacturer: string, model: string): seq[string]
  • getPulseqSpecs(manufacturer: string, model: string, gradient: string = ""): SystemSpec

SystemSpec fields:

  • B0: float64
  • maxSlew: float64
  • maxGrad: float64
  • slewUnit: string
  • gradUnit: string

Usage (Nim):

import pulseq_systems
echo listManufacturers()
let spec = getPulseqSpecs("Siemens", "Prisma")

Installation note:

  • The JSON data is plain MRSystems.json bundled with the project. You can install the Nim module as a Nim package (nimble) or include the module and JSON in your Nim project. Ensure the JSON path is correct relative to your installed module or copy MRSystems.json alongside the Nim module when packaging.

Credits and disclaimer

The JSON file has been compiled with the help of a large language model (Claude Opus 4.6) from publicly available sources and may not be exhaustive or perfectly accurate. No warranty is implied or explicitly granted. Please verify the specifications with official sources if you intend to use them for critical applications.

References

Contributing

Contributions (additional systems, corrections) are welcome. Please open an issue or a pull request with changes to the JSON or helper code.

License

This package is released under a MIT license. Please refer to the repository LICENSE file for licensing details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulseq_systems-0.1.3.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulseq_systems-0.1.3-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pulseq_systems-0.1.3.tar.gz.

File metadata

  • Download URL: pulseq_systems-0.1.3.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for pulseq_systems-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e6b912d1b591a690082d6d102149911f660068eb016982c98769580ebdbaded0
MD5 6bd7cb192b8ce93e7becf16cc28e9603
BLAKE2b-256 4c9f0287d3cbd6455f9374f9fb131b06ba3cc620decbf0591c7cfd2a45307f89

See more details on using hashes here.

File details

Details for the file pulseq_systems-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pulseq_systems-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for pulseq_systems-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0cd6db7d9a38cd55dc790b7607e407e5b3c8062304bbfe060287187cf314f9d3
MD5 7576fe9c48c40ad2aa3f1f8954f59eda
BLAKE2b-256 d63b52033b5541a98b279f1df1516f589800f34d858117a04086d09259c84645

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page