Skip to main content

A package to analyse the data generated by the frappy/NICOS interface, with the TNMR setup at Paul Scherrer Institut, Villigen, Switzerland

Project description

DNMR

The Data Analysis, Visualisation, and Interpretation Software for Nuclear Magnetic Resonance (DAVISNMR, or more simply DNMR) is a piece of software including a GUI to read and analyse files generated by the frappy-Tecmag NMR interface described here.

Features

  • Quick comparison of completely separate datasets (parallel viewing and handling)
  • Equally quick loading and combination of separate-but-related datasets for analysis (live concatenation of datasets)
  • Auto or manual data re-phasing, both for individual data points or in bulk
  • View time-domain and frequency-domain data
  • Apply easily-customisable filters to time-domain data
  • Common NMR analysis workflows including T1 fitting, field scans, and inverse Laplace transforms (ILTs)
  • Export processed data into an easy-to-handle CSV format
  • Easily extensible framework for custom analyses
  • Limited support for .TNT files natively generated by Tecmag's TNMR program

Installation

This software is available on Pip:

python -m pip install DNMR

Running

Simply load the software as a module. For example:

python -m DNMR

Any additional arguments will be loaded as datafiles into the zero-th channel. I.e., if you wanted to load "test_file_0p25K.hdf" and "test_file_1K.hdf" together, you'd run:

python -m DNMR test_file_0p25K.hdf test_file_1K.hdf

(one could also just use the buttons and dialogs in the GUI)

Modification

To add new tabs, there are a few different steps:

  1. Read through tab.py. This is the class that your new tab will be inheriting from. a. Take specific note of the functions generate_layout, plot_logic, and get_exported_data. These are the functions you'll override. b. Notice that every tab is given a matplotlib axis, self.ax, a reference to data_widgets['fileselector'] (self.fileselector), and a shared pool of other tabs, self.data_widgets, which it adds itself to upon construction.
  2. Create a new file, example_tab.py for example. a. "Fill in" the functions listed above. Don't forget to supercall the Tab constructor b. Feel free to take functionality from miniwidgets.py, pull data from other widgets (from data_widgets[X].data, for example; these tabs are all designed under a "friendly" architecture, in C++ terms), and separate plot_logic and update calls intelligently.
  3. Once you're happy with some basic functionality, edit the __main__.py file. a. In the MainWindow __init__ function, you'll need to create your tab with the rest of them. b. After creation, you must add your tab to the tabwidget_tabs object so that it will be loaded as a functional tab.

Once you've completed the above, you should see your tab in the main window.

Notes

If you're editing the code, it may be most useful to git clone the repository, then pip install -e . inside, to create a suitable development environment. I learned about this functionality through this project, so you might too :)

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

dnmr-1.6.3.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

dnmr-1.6.3-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file dnmr-1.6.3.tar.gz.

File metadata

  • Download URL: dnmr-1.6.3.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dnmr-1.6.3.tar.gz
Algorithm Hash digest
SHA256 bd61caadbfb7b6e4d9d7ab23f88a1d334153af9ee33e4ca53e7e94317255931d
MD5 662e4fc9369a98f56b467371ec9b99d0
BLAKE2b-256 eec928dcbbe43254d4d4f9d20061a94094fb074c74681b0656af8f66b84575d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnmr-1.6.3.tar.gz:

Publisher: python-publish.yml on Davis-Garrad/DNMR

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

File details

Details for the file dnmr-1.6.3-py3-none-any.whl.

File metadata

  • Download URL: dnmr-1.6.3-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dnmr-1.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e2e11ec888666f21c7d22f74445ad4be3afb7cc216a7052a1adb7b25e77273b3
MD5 e921767a1b2c187fb4ba707ee9f30f01
BLAKE2b-256 90acd34e1fef38a47f1a1c5f213240c779f757737c0c90ba46d079f66ac4c94a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnmr-1.6.3-py3-none-any.whl:

Publisher: python-publish.yml on Davis-Garrad/DNMR

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