Skip to main content

nmrPype

Python implementation of command-line program nmrpipe, using linux pipelines to process NMR data.

Installation

Installing nmrPype can be done by through pip:

# Install prerequisites
pip install numpy scipy
# Install program
pip install nmrPype

A virtual environment or conda environment is recommended for using nmrPype. If using conda, numpy and scipy can be installed using conda install.

Note

This is made for Python 3.10 or above. Some of the code requires Python 3.10's features such as match-case statements.

Python 3.12 is recommended as development is done with 3.12, but testing is done to assure that 3.10 is supported.

Usage

nmrPype can be used in through two methods: Command-line and Script

Command-line

nmrPype -in [inFile] -fn fnName -out [outFile] [-ov]

Functions:

FT                  Perform a Fourier transform (FT) on the data
ZF                  Perform a Zero Fill (ZF) Operation on the data
SP (SINE)           Adjustable Sine Bell
PS                  Perform a Phase Correction (PS) on the data
YTP (TP, XY2YX)     2D Plane Transpose
ZTP (XYZ2ZYX)       3D Matrix Transpose
ATP (XYZA2AYZX)     4D Matrix Transpose (unimplemented)
NULL                Null Function, does not apply any function

Run the nmrPype --help command to see a list of more options.

Script

In a Python script or jupyter notebook use the following line:

import nmrPype

I recommend setting the import as pype for simplification.

Example

import nmrPype as pype

df = pype.DataFrame("h.fid") # Load NMR data file into script
df.array() # Display spectral data array

Building From Source

Building using Pip

  1. Install prerequisites
pip install numpy scipy
  1. Clone the repository
git clone https://github.com/PhiMykah/nmrPype
  1. Install in development mode with pip:
cd nmrPype
pip install -e .

Building using Conda

With conda, the environment.yml file can be used to obtain the development environment.

  1. Clone the repository
git clone https://github.com/PhiMykah/nmrPype
  1. Copy the source conda environment
cd nmrPype
conda env create -f environment.yml --name nmrpype
  • You can set the name to anything you wish, but typically my convention is to have the environments lowercase
  1. Install in development mode with pip:
pip install -e .

Release files for nmrPype 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nmrPype 1.0.9
File Size Uploaded
nmrpype-1.0.9.tar.gz 62.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nmrPype 1.0.9
File Interpreter ABI Platform
nmrpype-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 141.3 kB

Release files / nmrpype-1.0.9.tar.gz

Download URL nmrpype-1.0.9.tar.gz
Size 62.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c20ed52a45238bbc83506832dae15b2b2ed285b11a4561beef1fb3270657726
BLAKE2b-256 checksum
How to use checksums
33f631b4a4803ffcac352588bf26d7f28cf5ce767e021bace30c0b6225d30f1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / nmrpype-1.0.9-py3-none-any.whl

Download URL nmrpype-1.0.9-py3-none-any.whl
Size 78.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5abfd99c7d404ec2dd4058237be30146b86e36786081b55f4496b7e8777721f9
BLAKE2b-256 checksum
How to use checksums
7225c8b11bb911bdc625306b6e3a95e978387dd62f987617cd0ab63f098463ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page