Skip to main content

Shared utilities for diffpy packages.

Project description

https://github.com/diffpy/diffpy.utils/actions/workflows/main.yml/badge.svg https://codecov.io/gh/diffpy/diffpy.utils/branch/main/graph/badge.svg

diffpy.utils

General purpose shared utilities for the diffpy libraries.

The diffpy.utils package provides functions for extracting array data from variously formatted text files and wx GUI utilities used by the PDFgui program. The package also includes an interpolation function based on the Whittaker-Shannon formula that can be used to resample a PDF or other profile function over a new grid.

For more information about the diffpy.utils library, see the users manual at http://diffpy.github.io/diffpy.utils.

INSTALLATION

The preferred method is to use Miniconda Python and install from the “conda-forge” channel of Conda packages.

To add “conda-forge” to the conda channels, run the following in a terminal.

conda config --add channels conda-forge

We want to install our packages in a suitable conda environment. The following creates and activates a new environment named diffpy-utils

conda create -n diffpy-utils python=3
conda activate diffpy-utils

Then, to fully install diffpy.utils in our active environment, run

conda install diffpy.utils

Another option is to use pip to download and install the latest release from Python Package Index. To install using pip into your diffpy-utils environment, we will also have to install dependencies

pip install numpy
pip install diffpy.utils

For those planning to use functions in the diffpy.utils.wx module, you will also need to install wxPython. Both of the following lines will install this package.

conda install wxPython
pip install wxPython

If you prefer to install from sources, after installing the dependencies, obtain the source archive from GitHub. Once installed, cd into your diffpy.utils directory and run the following

pip install .

To check the installation integrity, if the following passes all checks, you are good!

pip install pytest
python -m diffpy.utils.tests.run

DEVELOPMENT

diffpy.utils is an open-source software developed as a part of the DiffPy-CMI complex modeling initiative at the Brookhaven National Laboratory. The diffpy.utils sources are hosted at https://github.com/diffpy/diffpy.utils.

Feel free to fork the project and contribute. To install diffpy.utils in a development mode, with its sources being directly used by Python rather than copied to a package directory, use the following in the root directory

pip install -e .

Note that this is only supported for setuptools version 62.0 and above.

CONTACTS

For more information on diffpy.utils please visit the project web-page

http://www.diffpy.org/

or email Prof. Simon Billinge at sb2896@columbia.edu.

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

diffpy_utils-3.4.0.tar.gz (95.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffpy.utils-3.4.0-py3-none-any.whl (103.2 kB view details)

Uploaded Python 3

File details

Details for the file diffpy_utils-3.4.0.tar.gz.

File metadata

  • Download URL: diffpy_utils-3.4.0.tar.gz
  • Upload date:
  • Size: 95.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for diffpy_utils-3.4.0.tar.gz
Algorithm Hash digest
SHA256 24e4c6108e87345be3518e085b2ebc85efb3e4fc7ff1097297cdcf92e7d9a9b9
MD5 e9c22f33112e766e1d3498c872d5e65a
BLAKE2b-256 62e1670e3e91eab651a144baca1f4ae14e50a620f0e8f83dea57b7692a0b717a

See more details on using hashes here.

File details

Details for the file diffpy.utils-3.4.0-py3-none-any.whl.

File metadata

  • Download URL: diffpy.utils-3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 103.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for diffpy.utils-3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9440cadc3c2d1ce9770102a8138d7482287992b3f3ad69a23906cbe2733b310
MD5 b1586a03a5b4b266052abaf3a1b270f9
BLAKE2b-256 773f4caef5cbcce264290df8892e46120ddd7925fcab586b45ad5585066a7174

See more details on using hashes here.

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