Compute small-angle scattering form factors for arbitrary shapes
Project description
CDEF (Computing Debye's scattering formula for Extraordinary Formfactors)
This is a Python package to approximately calculate scattering profiles of arbitrarily shaped nanoparticles for small-angle X-ray scattering (SAXS). CDEF generates a quasi-randomly distributed point cloud in the desired particle shape and then applies Debye’s formula to this ensemble of point scatterers to calculate the SAXS pattern. The shape can be loaded from an STL file. CDEF is implemented as an interface to the open source software Debyer for efficient evaluation of Debye's scattering formula. This allows the fitting of measured scattering data within reasonable time on ordinary desktop computers.
The software is described in detail in this paper.
This program was written at the Physikalisch-Technische Bundesanstalt (PTB) by Jerome Deumer and Christian Gollwitzer (2022) and is distributed under the terms of the GNU General Public License 3.0.
Usage
The usage of CDEF for computing a scattering curve and fitting measured data is demonstrated in CDEF_demo.ipynb
Installation
The recommended way is to install CDEF via pip
:
pip install CDEF --user
Drop the --user
if you want to install the package system-wide. To ensure you use the correct python, invoke pip as
python3 -m pip install CDEF --user
where python3
should be replaced by your Python 3 command, e.g. python3
on most Linux installations or python
on Anaconda for Windows.
To install from source, go to the directory where you cloned this repository and enter the following command at the command prompt:
python3 -m pip install . --user
System requirements
CDEF should run on most systems with Python 3.6+ and requires a working C compiler compatible with Python. In addition, the following Python packages are required:
- NumPy
- SciPy
- Matplotlib
On Linux and macOS, most setups will work with the system C compiler. For Windows, the installation of a compatible C compiler is described here.
License
This program was written at the Physikalisch-Technische Bundesanstalt (PTB) by Jerome Deumer and Christian Gollwitzer (2022) and is distributed under the terms of the GNU General Public License 3.0.
CDEF is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CDEF is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with CDEF. If not, see <https://www.gnu.org/licenses/>.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file CDEF-1.0.tar.gz
.
File metadata
- Download URL: CDEF-1.0.tar.gz
- Upload date:
- Size: 64.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7f50e6897eeec98b019ada4fbc3a5ac498262ece764ebc1899a5fb72638658c |
|
MD5 | d8530ce7b93900f4858259306eaf172e |
|
BLAKE2b-256 | 3735ed3c8fd2cd9f33768028b306ffe524630116b6183fa99426952add1de1ec |
File details
Details for the file CDEF-1.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: CDEF-1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 64.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58d082e0f1f86ba433fed594cfc5da5088301b3e1623e727573af75f6f8008a5 |
|
MD5 | 7c969b50bb7b13de233ad41b585dc7e4 |
|
BLAKE2b-256 | 3365c070f370a79d53e883e8ab8dc55ba84c90970856cc4e73e52b44cef137ba |
File details
Details for the file CDEF-1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 214.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 241a6e9aee46707fd976897a5e7daf4deebc8ee50649db4417a97317e9127c57 |
|
MD5 | a24361ce47e225a15ea327944f4c3b35 |
|
BLAKE2b-256 | 4c0b5422befe9936b9a7129026ce282139f92598ce0abb942554b403b899c2e8 |
File details
Details for the file CDEF-1.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 352.5 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8adad6d8a082bb8bf1477de83c93f217e330db04e6dbcfd53b6f470114bd9284 |
|
MD5 | c0dcf5cfb10be748662495fb880ba7bc |
|
BLAKE2b-256 | 402b7697c07f33a6b47b569c2346c4619d1983d675f3a552ca153b0ddac2896e |
File details
Details for the file CDEF-1.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: CDEF-1.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 64.1 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dedefdc457b5eba93070d75bc34e059afe9a588e9cda81763dc6697302fafa1 |
|
MD5 | 98a9768006711492e20ecc5a3bc2d251 |
|
BLAKE2b-256 | 43a2116bfc9426f7817658314635c729071f8bd3fd53173301c39cb45fe2f210 |
File details
Details for the file CDEF-1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 213.5 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02c854fa2e0421e3edef8e0a9187c2adf89bace55136ea02f70405373535dbff |
|
MD5 | 1a8ad3fc4fe5c4250af167a02fbb0699 |
|
BLAKE2b-256 | fd68f5607fec6887f1397792b591d04e81b38c057a5aab457d0b440637aaed1e |
File details
Details for the file CDEF-1.0-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 352.5 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7deb0fdf8d6892b12e5b04d247e1cd7b0e1f65d27de6ff037cb2d0c77807e2e4 |
|
MD5 | 37540c754f506caf5d065a39d18514d2 |
|
BLAKE2b-256 | bec8bc97e13c6adbb1bb4aef8075baf97ad45e3ab2b55fa21d67a7b56d734163 |
File details
Details for the file CDEF-1.0-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: CDEF-1.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 64.1 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 895207f39ab0a2dc59226301a28ec51038e946b5d91c048ee3179a43b98cf99e |
|
MD5 | 2f192e730f7c40a619d65790aab23205 |
|
BLAKE2b-256 | e300fa9d790f845e4a7c1ef6c1912e2bce3f9318752ac6c24c4d609e68fcce2c |
File details
Details for the file CDEF-1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 213.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7486a8e3c4ab066f5e58c75bf371baaeb66a45aa0e4763d1fcb4507b3913b6f8 |
|
MD5 | 4e86aff3915ea7ac53c8b94f8446926a |
|
BLAKE2b-256 | bd8cb508277699a555db0ece4e799192f1549904d23a1d55d8cb733498e70955 |
File details
Details for the file CDEF-1.0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 352.5 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d4a2f681f200c8114548c86b0b34f4b5048a748cc109afe831014fcf2913c3 |
|
MD5 | 67b4d8025b6f44462fe35aab9c400897 |
|
BLAKE2b-256 | 0fc2599257bf428413943ee659b4c91cf266c2bd7a6848de26588626716759eb |
File details
Details for the file CDEF-1.0-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: CDEF-1.0-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 64.1 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63f09d1d172a9a5edf372904575c107c8b5515c874dd4628276b00cbcd927db5 |
|
MD5 | 6b48a9a1e7ef9ead0b6dd6758708f808 |
|
BLAKE2b-256 | 4f79ddbc724cb0cb3b4eb5870558f0ee230f42377d4cd82f21e296541e376d63 |
File details
Details for the file CDEF-1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 212.6 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5a3ca5ea5c4732ebc3db60f4678810cd4141fad0a5d1b445eed894aebad7b0 |
|
MD5 | 2d259575b2ca0a898b6c1aae791f3af1 |
|
BLAKE2b-256 | 7c9927d5b2cb092436782e7cd2323d34eabd78f01c36c7377302a30a1049025f |
File details
Details for the file CDEF-1.0-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 352.4 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115fc4ef7661acbda4f0456c65fb65b975809170d783f85b1758c1d01870d92d |
|
MD5 | 552255dee0a9c2d6375741f482c5a306 |
|
BLAKE2b-256 | fb93e5b1df77e069c8a4691393c004bae258a2ee8e9c8c488af7545b0383f400 |
File details
Details for the file CDEF-1.0-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: CDEF-1.0-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 68.4 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c729372dde8de9190d05552bf8d921b5de06b07869045aa0c6f758fef39d227 |
|
MD5 | cc588da0a17723414d94006fa674e0d1 |
|
BLAKE2b-256 | 66b8507c1102f26d31d388d04389ef170964fa5afeadd4212260f949653feca2 |
File details
Details for the file CDEF-1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 212.6 kB
- Tags: CPython 3.6m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e64ceacc65ff3cd8aa04a6aa5756f1ce406ad67c40c04238d2ac2870ff07534 |
|
MD5 | cb075c4f27c57019d63faa3badd71347 |
|
BLAKE2b-256 | 2acb20820ff68caaff8fd3a23a435b2a122af7fb655ce380a94de2acd4b26464 |
File details
Details for the file CDEF-1.0-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: CDEF-1.0-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 352.4 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce0b71063934bf32c81ab15275cb43c201685af9a63046bdb49c45a8e0921197 |
|
MD5 | 55653584b8432010f836bbe8ee3ba8b4 |
|
BLAKE2b-256 | 72aad4816071671ad0db5ad639875868f5b2f5322df1b0217250a857d64ab3fc |