Metadata-Version: 2.2
Name: nmrPype
Version: 1.0.8
Summary: Python implementation of Nuclear Magnetic Resonance (NMR) signal analysis program "nmrPipe"
Author: Micah Smith
Author-email: Micah Smith <mykahsmith21@gmail.com>, Frank Delaglio <frank.delaglio@nist.gov>
Maintainer-email: Micah Smith <mykahsmith21@gmail.com>
License: Copyright Notice and Statement for the nmrPype project
        
        
        Copyright (c) 2023-2024 Micah J. Smith
        All rights reserved.
        
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are
        met:
        
        
        a. Redistributions of source code must retain the above copyright
           notice, this list of conditions and the following disclaimer.
        
        
        b. Redistributions in binary form must reproduce the above copyright
           notice, this list of conditions and the following disclaimer in the
           documentation and/or other materials provided with the
           distribution.
        
        
        c. Neither the name of the author nor the names of contributors may
           be used to endorse or promote products derived from this software
           without specific prior written permission.
        
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
        "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
        LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
        
        Copyright Notice and Statement for the nmrglue Project
        
        
        Copyright (c) 2010-2015 Jonathan J. Helmus
        All rights reserved.
        
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are
        met:
        
        
        a. Redistributions of source code must retain the above copyright
           notice, this list of conditions and the following disclaimer.
        
        
        b. Redistributions in binary form must reproduce the above copyright
           notice, this list of conditions and the following disclaimer in the
           documentation and/or other materials provided with the
           distribution.
        
        
        c. Neither the name of the author nor the names of contributors may
           be used to endorse or promote products derived from this software
           without specific prior written permission.
        
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
        "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
        LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: Homepage, https://github.com/PhiMykah/nmrPype
Project-URL: Documentation, https://phimykah.github.io/nmrpype/
Project-URL: Repository, https://github.com/PhiMykah/nmrPype.git
Project-URL: Issues, https://github.com/PhiMykah/nmrPype/issues
Keywords: nmr,decomposition
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: matplotlib
Dynamic: author

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

- **Documentation:** https://phimykah.github.io/nmrpype
- **NMRPipe Website:** https://www.ibbr.umd.edu/nmrpipe
- **Source Code:** https://github.com/PhiMykah/nmrPype
- **Bug Reports:** https://github.com/PhiMykah/nmrPype/issues

Installation
============
Installing nmrPype can be done by through pip:
```sh
# 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:
```py
import nmrPype
```
I recommend setting the import as `pype` for simplification.
### Example
```py
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
```sh
pip install numpy scipy
```
2. Clone the repository
```sh
git clone https://github.com/PhiMykah/nmrPype
```
3. Install in development mode with pip:

```sh
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
```sh
git clone https://github.com/PhiMykah/nmrPype
```
2. Copy the source conda environment
```sh
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

3. Install in development mode with pip:
```
pip install -e .
```

