Skip to content

easyscience/diffraction-lib

Repository files navigation

easydiffraction

Development playground for the new EasyDiffraction API.

Installation & Setup

  • Create a new virtual environment:
    python3 -m venv .venv
  • Activate the environment:
    . .venv/bin/activate
  • Install dependencies:
    pip install -r requirements.txt
  • Install pycrysfml (pyenv python 3.12, macOS 14, Apple Silicon):
    pip install deps/pycrysfml-0.1.6-py312-none-macosx_14_0_arm64.whl
    otool -L .venv/lib/python3.12/site-packages/pycrysfml/crysfml08lib.so
    install_name_tool -change `python3-config --prefix`/Python `python3-config --prefix`/lib/libpython3.12.dylib .venv/lib/python3.12/site-packages/pycrysfml/crysfml08lib.so
    otool -L .venv/lib/python3.12/site-packages/pycrysfml/crysfml08lib.so

Testing

PYTHONPATH=$(pwd)/src python -m pytest tests/ --color=yes

Running examples

  • Simplified API:
    PYTHONPATH=$(pwd)/src python examples/joint-fit_simple-api.py
  • Advanced API:
    PYTHONPATH=$(pwd)/src python examples/joint-fit_advanced-api.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages