Metadata-Version: 2.4
Name: nmrglue-ng
Version: 1.6.1
Summary: An independent continuation of nmrglue for working with NMR data in Python
Author-email: "Jonathan J. Helmus" <jjhelmus@gmail.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://nmrglue-ng.readthedocs.io/stable/
Project-URL: Documentation, https://nmrglue-ng.readthedocs.io/stable/
Project-URL: Repository, https://github.com/spectrochempy/nmrglue-ng
Project-URL: Issues, https://github.com/spectrochempy/nmrglue-ng/issues
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: numpy>=1.21.2
Requires-Dist: scipy>=1.7.2
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-book-theme; extra == "docs"
Requires-Dist: sphinx-design; extra == "docs"
Requires-Dist: sphinx_rtd_theme; extra == "docs"
Requires-Dist: myst-nb; extra == "docs"
Requires-Dist: numpydoc; extra == "docs"
Requires-Dist: matplotlib; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: h5py; extra == "test"
Requires-Dist: tomli; python_version < "3.11" and extra == "test"
Dynamic: license-file

==========
nmrglue-ng
==========

|CI| |Coverage| |PyPI| |Conda| |Docs| |License|

.. |CI| image:: https://github.com/spectrochempy/nmrglue-ng/actions/workflows/ci.yml/badge.svg?branch=master
   :alt: Test status on master
   :target: https://github.com/spectrochempy/nmrglue-ng/actions/workflows/ci.yml?query=branch%3Amaster
.. |Coverage| image:: https://codecov.io/gh/spectrochempy/nmrglue-ng/branch/master/graph/badge.svg?flag=autonomous
   :alt: Self-contained test coverage on master
   :target: https://app.codecov.io/gh/spectrochempy/nmrglue-ng/tree/master
.. |PyPI| image:: https://img.shields.io/pypi/v/nmrglue-ng
   :alt: PyPI version
   :target: https://pypi.org/project/nmrglue-ng/
.. |Conda| image:: https://img.shields.io/conda/v/spectrocat/nmrglue-ng
   :alt: Conda version on spectrocat
   :target: https://anaconda.org/spectrocat/nmrglue-ng
.. |Docs| image:: https://img.shields.io/readthedocs/nmrglue-ng/stable
   :alt: Stable documentation build status
   :target: https://nmrglue-ng.readthedocs.io/stable/
.. |License| image:: https://img.shields.io/pypi/l/nmrglue-ng
   :alt: BSD 3-Clause License
   :target: https://github.com/spectrochempy/nmrglue-ng/blob/master/LICENSE.txt

Read, write, convert, process, and analyse NMR data in Python. nmrglue-ng is
an independent continuation of `nmrglue <https://github.com/jjhelmus/nmrglue>`_,
originally developed by Jonathan J. Helmus and contributors.

What nmrglue-ng adds
====================

nmrglue-ng retains the historical import and reader interfaces while correcting
I/O, processing and analysis defects that can change numerical results.
Representative additions and corrections include:

* Spectral-axis calibration and dimension order for JCAMP-DX, JEOL and RNMRTK,
  including permuted RNMRTK layouts, sample packing and converter exports.
* Bruker low-memory trace addressing and preservation of real float64 data.
* Complete complex FFT, phase and low-level frequency-shift results for real
  inputs, corrected wrapper shift directions, and quadrature packing.
* Automatic quadrature balancing, working arithmetic-mean and real-channel
  filters, and restored Cholesky signal modeling.
* Consistent bounded analytic-Jacobian fits and corrected fitting covariance;
  uncertainties are unavailable when fitted parameters reach a bound.
* Corrected integration uncertainties, baseline edge windows and peak
  segmentation.
* Additional JCAMP-DX decoding and explicit interop profiles that expose
  samples, physical axes, component conventions and normalization provenance.

Regression tests cover these changes, with selected workflows additionally
compared against external datasets and NMR software. Coverage varies by
format and operation. The `migration guide
<https://nmrglue-ng.readthedocs.io/latest/migration.html>`_ explains which
results to recheck; the `development changelog
<https://nmrglue-ng.readthedocs.io/latest/whats-new.html>`_ distinguishes released
fixes from development changes. Existing scripts may produce different,
corrected values even when their calls stay the same.

The coverage badge measures the self-contained tests on Ubuntu with Python
3.13, including branch coverage. Tests requiring the external corpus, NMRPipe
or unavailable optional dependencies are outside this indicator's scope.

Quick start
===========

Install the ``nmrglue-ng`` distribution in a Python 3.10+ environment::

    python -m pip install nmrglue-ng

The Python import remains ``nmrglue``. For example, read an NMRPipe FID:

`Download the sample FID
<https://github.com/spectrochempy/nmrglue-ng/raw/v1.1.2/doc/source/getting-started/synthetic_1d_time.fid>`_
and save it beside your script.

.. code-block:: python

    import nmrglue as ng

    dic, data = ng.pipe.read("synthetic_1d_time.fid")

The reader returns a dictionary of NMRPipe header values and a NumPy array.
Use separate environments for the historical ``nmrglue`` distribution and
``nmrglue-ng``, since both install the same Python package.
The `installation guide <https://nmrglue-ng.readthedocs.io/stable/install.html>`_
covers uv, pip, and Conda.

For new integrations, ``nmrglue.interop`` provides structured results with
samples, axes, metadata, and diagnostics. Check the
`supported profiles <https://nmrglue-ng.readthedocs.io/stable/reference/interop.html#interop-profile-table>`_
for format coverage and limitations.

Documentation
=============

* `Getting started <https://nmrglue-ng.readthedocs.io/stable/getting-started/index.html>`_
  walks through reading, processing, and plotting a first spectrum in a
  downloadable notebook.
* `Tutorials <https://nmrglue-ng.readthedocs.io/stable/tutorials/index.html>`_
  cover reading, processing, conversion, and analysis with worked examples.
* `Coming from nmrglue? <https://nmrglue-ng.readthedocs.io/stable/migration.html>`_
  explains how to set up a separate environment and which changes can
  affect existing workflows.
* `API reference <https://nmrglue-ng.readthedocs.io/stable/reference/index.html>`_
  covers the format readers, processing, analysis, and interop interfaces.
* `Release notes <https://nmrglue-ng.readthedocs.io/stable/whats-new.html>`_
  describe changes by release. See the `development documentation
  <https://nmrglue-ng.readthedocs.io/latest/>`_ for unreleased features.

Contributing
============

Use the `Contribute section <https://nmrglue-ng.readthedocs.io/latest/contribute/index.html>`_
for issue reports, development setup, tests, documentation builds, and
pull requests.

Citation and license
====================

Please cite the original nmrglue paper where appropriate:

    Jonathan J. Helmus and Christopher P. Jaroniec,
    *Nmrglue: an open source Python package for the analysis of
    multidimensional NMR data*, Journal of Biomolecular NMR 55,
    355–367 (2013). doi:10.1007/s10858-013-9718-x.

nmrglue-ng retains the original Git history and is distributed under the
`BSD 3-Clause License
<https://github.com/spectrochempy/nmrglue-ng/blob/master/LICENSE.txt>`_.
