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.4.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.4-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dnmr-1.6.4.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.4.tar.gz
Algorithm Hash digest
SHA256 88637298e84c8a1f87bebdde6691944b7c535a1626f633ef7453ae0267b1335a
MD5 e782be5e61e9b36978a072156ef36ca3
BLAKE2b-256 d12a689cfbd0937908a9019b9b67696021736e2842458378f26876cddf455e6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnmr-1.6.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: dnmr-1.6.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1c99a8570b750b74b9c41e7558fdfe3e2df0ab2ddd737e9157797349da5129ad
MD5 420b651cb13bc22c0fcbfb768f804993
BLAKE2b-256 93654f5f5649ae94088a0d33d277a364e2a64e91e7de71919e93c5a8894f4979

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnmr-1.6.4-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