Skip to main content
BasisREMY Logo

BasisREMY

A Unified Framework for Study-Specific Basis Set Generation in MR Spectroscopy

PyPI Python Tests ISMRM 2026


A tool for generating study-specific basis sets directly from raw MRS data, integrating real pulse shapes and acquisition parameters. This project is in its early development stages, and contributions, testing, and feedback are highly welcomed!

BasisREMY Workflow

Prerequisites

  • uv — installs Python and all dependencies into an isolated environment (one-line installer below); nothing is installed globally.
  • git — fetches the simulation toolboxes the first time you simulate (and clones the repository if you develop).
  • Docker or Octave (only for simulating) — Docker Desktop (recommended) or a local Octave 4.0+; see Docker / Octave Requirements.

Quick Start (for users)

The fastest way to run BasisREMY is with uv — a single tool that installs Python for you (no manual Python, pip, or conda setup required).

1. Install uv (one time):

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Launch BasisREMY — the released version, straight from PyPI:

uvx basisremy

Or, for repeated use, install the command once and then run it by name:

uv tool install basisremy
basisremy

To open it with a click like any other app, add an app icon once:

uvx basisremy --install-shortcut      # or: basisremy --install-shortcut

This puts BasisREMY with its logo in Applications (macOS), the app menu (Linux), or the Start Menu and on the Desktop (Windows).

To run the latest development state instead of the release:

uvx --from git+https://github.com/julianmer/BasisREMY basisremy

Using BasisREMY from Python instead of the GUI? The package is on PyPI — pip install basisremy gives you the programmatic API (see Examples below) without any GUI setup.

uv automatically downloads a compatible Python and all dependencies into an isolated environment — nothing is installed globally and your data never leaves your machine.

First run: the first simulation with an engine on a new machine sets that engine up (its toolbox at a pinned version into ~/.basisremy or $BASISREMY_HOME, and its Docker image if needed) and can take a few minutes; after that it starts in seconds. Ran BasisREMY before? uvx basisremy@latest gets the newest release.


Usage Overview

BasisREMY guides you through a simple three-step workflow, shown as a numbered stepper at the top of the window (Data → Parameters → Simulate). You can click any completed step to go back and make changes. A light/dark theme toggle sits in the top-right corner and follows your system setting by default.

  1. Data — Drop your MRS data file onto the upload area (or click it to browse). Click Continue to automatically read the file and pre-fill the acquisition parameters, or Skip to configure everything manually.
  2. Parameters — One layout for every engine: pick the Engine and the Sequence, optionally a Sequence file (any pulse or whole-sequence file), then check the timings, the acquisition values and the metabolites to include. Each value is marked by where it comes from: from the data file, recommended / default (for design values no header holds, such as the echo split; hover for the source), set by you, or missing (Simulate stays blocked until you fill it). When the required fields are set, click Simulate basis set.
  3. Simulate — A progress bar shows the simulation status. When it finishes, an interactive spectrum plot appears and you can click Export basis… to save the basis set in LCModel (.basis or .RAW), jMRUI, FSL-MRS, Osprey, FID-A, INSPECTOR, ProFit, MARSS, MRSCloud, or SpinWizard/JET format (by default into ~/BasisREMY/output/). Format writing is handled by the bundled MRS Basis Set Conversion Toolbox.

Every input has a small (?) help icon — hover it for a short explanation of that parameter.

Sequence designer (new, in testing) — the wand next to the sequence file opens the designer: choose the sequence, its timings and a pulse per role (ideal, a standard shape, or a pulse file in any format; the scan's own pulse where the data header stores it), see the timeline, and save the design as a Pulseq .seq (in ~/BasisREMY/sequences/). The saved file is selected right away; the engine chips show which engines run the design as is, with differences, or not at all.

Examples (No GUI)

Want to use BasisREMY programmatically? Check out the examples/ folder!

Quick start:

python examples/basic_usage.py

The example shows how to:

  • Load MRS data and extract parameters automatically
  • Configure and run simulations without the GUI
  • Customize metabolite lists and output settings

In your own scripts, call basisremy.prepare_runtime() first and give file paths as absolute paths: the simulation engines run from BasisREMY's runtime folder, as in the GUI.


Developer Setup

Clone the repository (with submodules) and let uv create the environment:

git clone --recurse-submodules https://github.com/julianmer/BasisREMY.git
cd BasisREMY
uv sync            # creates .venv and installs all dependencies
uv run basisremy   # launches the GUI

uv sync reads pyproject.toml, provisions a matching Python, and installs everything into .venv. You do not need to activate the environment — uv run handles that automatically. To include development tools (pytest, coverage), run uv sync --extra dev.

Prefer pip? pip install basisremy for the Python API, or pip install -e . in a clone.


Docker / Octave Requirements

Simulation backends execute MATLAB/Octave code and therefore need an Octave runtime. BasisREMY supports two interchangeable options and selects one automatically:

  1. Docker (recommended) — install Docker Desktop (macOS/Windows) or Docker Engine (Linux), and make sure it is running. BasisREMY pulls/builds an Octave container on demand.
  2. Local Octave — install Octave 4.0+ directly; it is used as a fallback when Docker is unavailable.

Whether an Octave runtime is needed is backend-dependent: data extraction and parameter configuration work without it; only the simulation step requires it. See the Octave Setup Guide for detailed instructions.

The Spant backend needs R in the same way: Docker (BasisREMY builds an R image with the spant package on first use) or an R installation of your own, into which the package is installed on first use. The Vespa backend needs neither — it runs in a Python side-environment or Docker.

Three environment variables tune the runtimes:

Variable Effect
BASISREMY_OCTAVE_WORKERS Octave processes used to simulate metabolites in parallel (default: half the CPUs, at most 4).
BASISREMY_NO_DOCKER Set to 1 to ignore Docker entirely and use only a local Octave.
BASISREMY_SPANT_RUNTIME docker or local to force the Spant runtime (default: Docker, then your own R).

Troubleshooting

  • Window stays blank or pywebview errors (You must have either QT or GTK) — the desktop window needs a display and, on Linux, a system WebKitGTK package. Run basisremy --browser (or uvx basisremy --browser) to use the UI in your web browser at http://localhost:8080 instead; without a display this happens automatically.
  • Running on a server (SSH) — start uvx basisremy on the server, then on your own machine run ssh -L 8080:localhost:8080 user@server and open http://localhost:8080 in a browser. Use --port if 8080 is taken.
  • Simulation fails / "Octave not found" — start Docker Desktop/Engine, or install local Octave. See the Octave Setup Guide.
  • uv: command not found — re-open your terminal after installing uv, or add its install location to your PATH.
  • Backends can't find externals/... — the simulation toolboxes are fetched on first use into ~/.basisremy (or $BASISREMY_HOME); make sure git is installed and you have network access the first time you run a simulation. In a cloned repository the existing submodules under externals/ are used as-is.

The project builds upon the methodologies used in existing tools. Some references include:


Built with ❤️ for the MRS community

Metadata

Release files for basisremy 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for basisremy 0.2.4
File Size Uploaded Provenance Actions
basisremy-0.2.4.tar.gz 1.4 MB With provenance Details for basisremy-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for basisremy 0.2.4
File Interpreter ABI Platform Actions
basisremy-0.2.4-py3-none-any.whl Python 3 none any Details for basisremy-0.2.4-py3-none-any.whl

Total release size: 2.8 MB

Release files / basisremy-0.2.4.tar.gz

Download URL basisremy-0.2.4.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
24a4554730767a378ffaa49a2d36a4144beb4691f315eb97b4dd15d01f042086
BLAKE2b-256 checksum
How to use checksums
2c10592ff5ab4f8e413bfd77cd7b99b805aa90d574ce0fa0a0ac94815e36ae6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / basisremy-0.2.4-py3-none-any.whl

Download URL basisremy-0.2.4-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3879b6a8b39d946973a36ddf7424b3d3f6984de2ce30998a770f3f35c167b42c
BLAKE2b-256 checksum
How to use checksums
881ffb9a5a1c90373d5da6efce6cebf0d9511e7948f9d08032c8ef7031ace7e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for basisremy 0.2.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for basisremy-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page