Skip to main content

Read Siemens raw data.

Project description

RawDatarInator

Python bindings for BART’s twixread function ([1]). This new version of rawdatarinator replaces the old Python port of a MATLAB script. Consequently, this one runs much faster and breaks less often. A cleaner interface is provided which will break all old code. See usage for examples. In general, this new release has fewer features that work better.

The name of the project pays homage to the naming convention of the main antagonist in Disney’s hit cartoon “Phineas and Ferb” ([2]).

Installation

This package is known to work with Python 3.6.8 using Ubuntu 18.04. If it doesn’t work on your system, please submit an issue and we can try to figure something out. The goal is to provide a simple pip-installable Python interface for BART’s twixread function. The Cythonized BART code is compiled during the installation, so you will need a C compiler installed.

Use pip to install:

pip install rawdatarinator

Usage

You get a few functions:

# BART's twixread function can be invoked right from a Python
# script:
from rawdatarinator import twixread
twixread('path/to/input/data.dat', 'path/to/output')

# A pair of .cfl, .hdr will be created: path/to/output.[cfl/hdr]
# as BART normally does.  However, if you're using these Python
# bindings, you might want to just grab the data straight away.
# You can do this by not providing any output file:
data = twixread('path/to/data.dat')

# You can read existing BART files like this:
from rawdatarinator import read
data = read('path/to/file/without/extentsion')

# If you've used BART's Python interface, this is a modified
# verison of readcfl.  It works just like that.  Similarly,
# BART's writecfl functionality can be found:
from rawdatarinator import write
write('path/to/out', data)

Note that currently only the -A option is supported, as that is the only one I ever user. If you need the full twixread functionality, please open up an issue.

References

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

rawdatarinator-1.1.0.tar.gz (159.1 kB view details)

Uploaded Source

File details

Details for the file rawdatarinator-1.1.0.tar.gz.

File metadata

  • Download URL: rawdatarinator-1.1.0.tar.gz
  • Upload date:
  • Size: 159.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for rawdatarinator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6cc8545ad8bdd36a4c634df7c55ef46f94f7d2c7d6a5bc557992d3f220c6816d
MD5 9957f2fcae89841ffaf8558d099dffc5
BLAKE2b-256 6f60fd8f9e0b8d5ad42bafcd59c6a85fe6f301c3340ee0981837196d1bf1f219

See more details on using hashes here.

Supported by

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