Skip to main content

β-NMR/β-NQR MUD file reader and asymmetry calculator

Project description

bdata

bdata is a lightwieght Python package aimed to aid in the analysis of β-detected nuclear magnetic/quadrupole resonance (β-NMR and β-NQR) data taken at TRIUMF. These techniques are similar to muon spin rotation (μSR) and "conventional" nuclear magnetic resonance (NMR), but use radioactive nuclei as their NMR probe in place of the muon or a stable isotope.

The intended user of bdata is anyone analyzing data taken from TRIUMF's β-NMR or β-NQR spectrometers. A key goal of the project is to alleviate much of the technical tedium that is often encountered during any analysis.

Used with bfit and the SciPy ecosystem, bdata forms part of a flexible API in the analysis of β-NMR and β-NQR data. bdata has been written to fullfill the following needs:

  • Provide an intuitive means of interfacing with MUD files in Python.
  • Fetch missing local data from the archive.
  • Support analyses by providing common data manipulations, such as calculating asymmetries or combining scans.

Contents

  • bdata [object]: access β-NMR and β-NQR MUD files
  • bjoined [object]: append bdata objects
  • bmerged [object]: combine bdata objects
  • life [mdict object]: dictionary of probe lifetimes.
  • containers [module]: specially defined mdict objects with set function.
  • exceptions [module]: custom exceptions and warnings for common issues
  • asym_fns [module]: functions for calculating asymmetries and errors

Citing

If you use bdata in your work, please cite:

Community Guidelines

  • Please submit contributions to bdata via a pull request
  • To report issues or get support, please file a new issue

Installation and Use

Dependencies

The following packages/applications are needed prior to bdata installation:

  • Python 3.6 or higher: a dynamically typed programming language. [install]

and the following are handelled automatically when retrieving bdata from the PyPI:

Install Instructions

Command
From the PyPI as user (recommended) pip install --user bdata
From the PyPI as root pip install bdata
From source python3 setup.py install

Note that pip should point to a (version 3) Python executable (e.g., python3, python3.8, etc.). If the above does not work, try using pip3 or python3 -m pip instead.

Optional Configuration

For convenience, you may want to tell bdata where the data is stored on your machine. This is done by defining two environment variables: BNMR_ARCHIVE and BNQR_ARCHIVE. This can be done, for example, in your .bashrc script. Both variables expect the data to be stored in directories with a particular heirarchy:

/path/
    bnmr/
    bnqr/
        2017/
        2018/
            045123.msr

Here, the folders /path/bnmr/ and /path/bnqr/ both contain runs (i.e., .msr files) organized into subdirectories by year of aquasition. In this case, you would set (in your .bashrc):

export BNMR_ARCHIVE=/path/bnmr/
export BNQR_ARCHIVE=/path/bnqr/

If bdata cannot find the data, it will attempt to download the relavent MUD files from the archive and store them in $HOME/.bdata. This is the default behaviour for bdata installed from PyPI

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

bdata-6.11.4.tar.gz (60.7 kB view details)

Uploaded Source

Built Distribution

bdata-6.11.4-py3-none-any.whl (61.5 kB view details)

Uploaded Python 3

File details

Details for the file bdata-6.11.4.tar.gz.

File metadata

  • Download URL: bdata-6.11.4.tar.gz
  • Upload date:
  • Size: 60.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for bdata-6.11.4.tar.gz
Algorithm Hash digest
SHA256 47c6b5fd4ef055fa8cebee807f5374e5d914caab6dd2bef006015429f85852bc
MD5 b169ba6f6ae14ec327863205d274a92e
BLAKE2b-256 d34fc47dd082a1a367350776689fd98e06a274d1be11142f2b19897ac12fa9b3

See more details on using hashes here.

File details

Details for the file bdata-6.11.4-py3-none-any.whl.

File metadata

  • Download URL: bdata-6.11.4-py3-none-any.whl
  • Upload date:
  • Size: 61.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for bdata-6.11.4-py3-none-any.whl
Algorithm Hash digest
SHA256 325143e2eac354f55c7dc2196dbd0ada6ccb053fd4896654b978995a6f606faf
MD5 3086629ceb9dfcf8bcc15783159f17da
BLAKE2b-256 91eafd2fbbdefdf3064896a768b2f76b532972bb039a286f4a17e0480d848d45

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