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.1.tar.gz (10.3 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.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pulseq_systems-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbdbbf7d6d44a81f3d7962d76964393dd962026b0a9b8b576a73e5098212ac0c
MD5 62adb146d7682766d5de85b9d56cc6bc
BLAKE2b-256 104f68c6ac507aee198ce96e95fe054c9be12e86046bcb931b5c0e63dba14c32

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pulseq_systems-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7315d24504634bdf8f7f4b9a2cf76aa8cc3ffd2fd86bd192cff94d6347c8cdd8
MD5 9f2f8354981b1bd31cb7afec9bcbb571
BLAKE2b-256 247b0c12a1f7cdc2e1810035baac08172b0dcda72676175645114c98874de4f4

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