A package containing file readers for XRD raw files.
Project description
fairmat-readers-xrd
A package developed by FAIRmat and collaborators which contains file readers for various X-Ray Diffraction (XRD) file formats.
Install and use
To use the readers, install the package using pip
and import the specific reader
function.
pip install fairmat-readers-xrd
from fairmat_readers_xrd import read_panalytical_xrdml
file_path = "<filepath>.xrdml"
data_dict = read_panalytical_xrdml(file_path)
Currently, the following file extensions are supported:
File Extension | Corresponding Reader Function |
---|---|
.xrdml |
read_panalytical_xrdml |
.rasx |
read_rigaku_rasx |
.brml |
read_bruker_brml |
Development
The package is still under development. To contribute, start with simply raising an issue on the repo. In case you want to contribute a piece of code, or a whole new reader, clone the repo in your local and start a virtual Python environment inside the directory.
git clone git@github.com:FAIRmat-NFDI/readers-xrd.git
cd readers-xrd
python3.9 -m venv .pyenv
source .pyenv/bin/activate
Then install the package in editable mode (-e flag), with dev
dependencies.
You can also run the pytest
to confirm all went well.
python -m pip install --upgrade pip
pip install -e .[dev]
pytest
Now you can start tinkering around. We recommend to create a new branch for this. If you want to contribute the code back to the upstream, simply create a Pull Request (PR), and we will get back to you. As a good practice, add tests for new readers and make sure existing tests are passing before creating PR.
You can also use Ruff
for automatic linting by running the following:
ruff format .
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
Built Distribution
Hashes for fairmat_readers_xrd-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb08b250089f11dff2816cbdb07eccd2b799ab9329b540363748943dd24b8a4c |
|
MD5 | c4f7602b009e0f2f9bd9bd6c08139df0 |
|
BLAKE2b-256 | ea91e60353cb6c11ecffe7b22df47ae25e509ddb21865d64832f018d2d55b019 |
Hashes for fairmat_readers_xrd-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3141af9756d83e310d3fb5dda14c66da1decf67f61c3535d192410c782461a47 |
|
MD5 | 771651b9bfd740ae37bd24114be5e1bb |
|
BLAKE2b-256 | 657c36f247c9b998f3c99b919b16734204dc1ff4d2f7d863f77d3f29a4b40f0a |