Skip to main content

在 Python 或 Jupyter Notebooks 中使用散景显示 NMR 数据的模块。

项目描述

什么是drawmr?

drawmr是一个用于在 Python 中查看 NMR 数据的模块。当与 nmrglue和bokeh包一起使用时,drawmr提供了查看 NMR 数据并与之交互的功能。

drawmr是nmrglue功能的包装器,并提供帮助函数以在散景中显示数据,这是一个交互式可视化库。

主要目的是在 Jupyter Notebook 中显示 NMR 数据。如果 Jupyter Notebook 安装未运行,散景允许将输出保存到静态 HTML 文件。

nmrglue用于处理 nmrdata,散景用于显示和交互。函数get_contour_widget() 创建 ipywidgets 以轻松控制轮廓级别。函数 get_peakpick()调用nmrglue peakpick.pick()来查找峰值,将数据点转换为 ppm 坐标,存储在pandas数据框中以便于检查并将峰值添加到散景图中。

查看示例

使用nbviewer.jupyter.org来:

启动交互式 Jupyter Notebook mybinder.org以尝试示例:

https://mybinder.org/badge.svg https://raw.githubusercontent.com/tlinnet/drawnmr/master/docs/images/image_2.png https://raw.githubusercontent.com/tlinnet/drawnmr/master/docs/images/image_1.png

如何安装?

如果使用 conda,这些步骤将安装环境

# With pip from https://pypi.python.org/pypi/drawnmr
pip install drawnmr

本地 conda 环境的开发人员安装:

# Create environment
conda env create -f environment.yml

# Activate environment
conda env list
source activate drawnmr

# Enable ipywidgets
jupyter nbextension list
jupyter nbextension enable --py widgetsnbextension --sys-prefix

# Start jupyter
jupyter notebook

或者在根环境中手动安装:

# Manually install package
python setup.py install --force

#  Manually uninstall
python setup.py install --record files.txt
PACK=`dirname $(head -n 1 files.txt)`
rm -rf $PACK
#cat files.txt | xargs rm -rf

开发商

# Modify version in: drawnmr/__init__.py

# Create tag
VERS=`python -c "from drawnmr import __version__; print(__version__)"`
# Adds a tag so that we can put this on PyPI
git tag $VERS -m ""
git push --tags origin master

# Upload your package to PyPI Test
python setup.py sdist upload -r pypitest
open https://testpypi.python.org/pypi/drawnmr

# Upload to PyPI Live
# Once you've successfully uploaded to PyPI Test, perform the same steps but point to the live PyPI server instead.
python setup.py sdist upload -r pypi
open https://pypi.python.org/pypi/drawnmr

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

drawmr-0.24.tar.gz (18.4 kB 查看哈希)

已上传 source