Skip to main content

β-NMR and β-NQR Data Analysis

Project description

bfit

DOI

bfit is a Python application 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 instruments and research program are governed through TRIUMF's CMMS, with more information given at https://bnmr.triumf.ca. An overview of instrumentation details and scientific applications of the β-NMR/β-NQR techniques can be found in several recent journal articles:

The intended user of bfit is anyone performing experiments with or analyzing data taken from TRIUMF's β-NMR or β-NQR spectrometers - independent of whether they are a new student, visiting scientist, or someone with decades of experience. (e.g., someone from the "local" TRIUMF/CMMS/UBC group). A key goal of the project is to alleviate much of the technical tedium that is often encountered during any analysis. More generally, bfit has been written to fulfill the following needs:

  • Provide the means for quick on-line analyses during beam time.
  • Provide a useful and flexible API for refined analyses in Python, to be used in conjunction with bdata and the SciPy ecosystem.
  • Provide an intuitive, user-friendly interface for non-programmers.
  • Be easily maintainable and distributable.

Citing

If you use bfit in your work, please cite:

D. Fujimoto, "bfit: A Python Application For Beta-Detected NMR," J. Open Source Softw. 6, 3598 (2021).

Useful Links

Community Guidelines

  • Contributing:
  • Reporting issues and/or seeking support:
    • Please file a new ticket in bfit's list of Issues - I will get an email notification of your problem and try to fix it ASAP!

Installation and Use

Dependencies

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

Install Instructions

Command
From the PyPI pip install bfit
From source pip install -e .
Developer mode pip --no-build-isolation -e .

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 Setup

For convenience, you may want to tell bfit 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 hierarchy:

/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 acquisition. In this case, you would set (in your .bashrc):

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

If bfit cannot find the data, it will attempt to download the relevant MUD (i.e., .msr) files from https://cmms.triumf.ca/mud/runSel.html. This is the default behaviour for bfit installed from PyPI.

First Startup

To launch the GUI from a terminal simply call bfit, if this fails, one can also use the alternative syntax python3 -m bfit, where python3 may be replaced with any (version 3) Python executable.

Testing

Testing your installation of bfit is accomplished by running pytest within the installation folder. Note that some tests, particularly those involving drawing, fail when run as group in this environment, but they should pass on a subsequent attempts: pytest --lf. Further testing information can be found here.

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

bfit-4.21.4.tar.gz (596.5 kB view details)

Uploaded Source

File details

Details for the file bfit-4.21.4.tar.gz.

File metadata

  • Download URL: bfit-4.21.4.tar.gz
  • Upload date:
  • Size: 596.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for bfit-4.21.4.tar.gz
Algorithm Hash digest
SHA256 f478c270d9b850bf7f698221a59ae17fd20e6472592bcbee4a17046d90a74716
MD5 6e125e5ff100bafed0a01d421a38c2e6
BLAKE2b-256 8d867b7015c74b0d9c2d0df4ec33c0996e8cc46c39f89ee1e067cd3c8d277640

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