Skip to main content

BrkRaw converter hook for Bruker PRESS SVS NIfTI-MRS outputs (ported from spec2nii)

Project description

brkraw-mrs

BrkRaw converter hook package that adds single-voxel MRS conversion support to the brkraw ecosystem. This project ports the Bruker MRS workflow from spec2nii and packages it as a BrkRaw hook so it can be installed and used through BrkRaw's hook tooling.

What It Does

  • Detects single-voxel MRS scans (PRESS/STEAM/SLASER by method name) and reads raw spectroscopy data from fid or rawdata.job0.
  • Converts interleaved real/imag to complex, infers dimensions, and writes NIfTI-MRS with a header extension JSON (NIfTI-2 preferred).
  • Writes a JSON sidecar with NIfTI-MRS metadata for convenience.

The goal is to make single-voxel MRS data usable with the same downstream tools as MRI, so MRS workflows can benefit from the broader BrkRaw ecosystem.

Install (BrkRaw Hook Standard)

Install the Python package, then install the hook assets into BrkRaw:

pip install brkraw-mrs
brkraw hook install brkraw-mrs

To install by entrypoint name:

brkraw hook install mrs

To view the packaged hook docs:

brkraw hook docs brkraw-mrs --render

BrkRaw Usage

brkraw convert \
  /path/to/bruker/PV_dataset \
  --output /path/to/output \
  --sidecar

Support Matrix

Tested datasets are based on the Bruker ParaVision standard datasets: https://www.bruker.com/protected/en/services/communities/pci-community/paravision-versions/paravision-standard-datasets.html

  • PV360 3.5 PRESS: conversion tested
  • PV360 3.6 PRESS: conversion tested
  • PV360 3.7 PRESS: conversion tested
  • Older ParaVision versions: not tested
  • Other MRS sequences (STEAM, SLASER, others): not tested

Notes: Data ordering for PRESS SVS is assumed as:

(1, 1, 1, n_points, n_averages?, n_dynamics?, n_coils?)

If a dimension is missing or equals 1, it is omitted.

Contributing

This repository is shared as a prototype. The core BrkRaw maintainers are primarily focused on MRI conversion and do not have deep MRS domain expertise. We welcome MRS researchers and developers to validate the workflow and guide ongoing development so it can evolve beyond a single-voxel prototype. Please see CONTRIBUTING.md and start a discussion at: https://github.com/orgs/BrkRaw/discussions/categories/brkraw-mrs

Attribution and License

This hook is a port of the spec2nii Bruker MRS workflow. See NOTICE for attribution details and LICENSE for terms.

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

brkraw_mrs-0.2.2.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

brkraw_mrs-0.2.2-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file brkraw_mrs-0.2.2.tar.gz.

File metadata

  • Download URL: brkraw_mrs-0.2.2.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brkraw_mrs-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2048e86b3d2ffeacfae4af32be1f5762ca6018dd102a50841045b3204a3a7d49
MD5 8a7e3989fd9940273830e976bdeb83f7
BLAKE2b-256 f898f2f8dbfb6ead9157f4f0037f5d4fd8cac053dc459b4ed491b1c2e8259368

See more details on using hashes here.

Provenance

The following attestation bundles were made for brkraw_mrs-0.2.2.tar.gz:

Publisher: publish.yml on BrkRaw/brkraw-mrs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brkraw_mrs-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: brkraw_mrs-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brkraw_mrs-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5245c33d97ed2fbe8d25091d30565b31d86e01ac0d8cb1a5ef6397d72562e36a
MD5 25a5288e66f6b1473cb4ee5d08869db6
BLAKE2b-256 ff9d422da1006e14c608c69c8ad4f396d0bd8c360031a9f2d6529b22273ec023

See more details on using hashes here.

Provenance

The following attestation bundles were made for brkraw_mrs-0.2.2-py3-none-any.whl:

Publisher: publish.yml on BrkRaw/brkraw-mrs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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