diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 00000000..b2c63cd6 --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. +config: c218e227793a017a1f0a456dc7aacf71 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 4af5eb24..00000000 --- a/.codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -coverage: - status: - project: # more options at https://docs.codecov.com/docs/commit-status - default: - target: auto # use the coverage from the base commit, fail if coverage is lower - threshold: 0% # allow the coverage to drop by - -comment: - layout: " diff, flags, files" - behavior: default - require_changes: false - require_base: false # [true :: must have a base report to post] - require_head: false # [true :: must have a head report to post] - hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage] diff --git a/.codespell/ignore_lines.txt b/.codespell/ignore_lines.txt deleted file mode 100644 index 07fa7c8c..00000000 --- a/.codespell/ignore_lines.txt +++ /dev/null @@ -1,2 +0,0 @@ -;; Please include filenames and explanations for each ignored line. -;; See https://docs.openverse.org/meta/codespell.html for docs. diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt deleted file mode 100644 index f91947db..00000000 --- a/.codespell/ignore_words.txt +++ /dev/null @@ -1,27 +0,0 @@ -;; Please include explanations for each ignored word (lowercase). -;; See https://docs.openverse.org/meta/codespell.html for docs. - -;; abbreviation for "materials" often used in a journal title -mater - -;; Frobenius norm used in np.linalg.norm -fro - -;; class name within distutils module -ccompiler - -;; dum as a C variable -dum - -;; gaus used for gaussian -gaus - -;; structure file format -DISCUS - -;; Periodic table elements -Te -Nd - -;; Ois -Ois diff --git a/.flake8 b/.flake8 deleted file mode 100644 index a5105116..00000000 --- a/.flake8 +++ /dev/null @@ -1,13 +0,0 @@ -# As of now, flake8 does not natively support configuration via pyproject.toml -# https://github.com/microsoft/vscode-flake8/issues/135 -[flake8] -exclude = - .git, - __pycache__, - build, - dist, - docs/source/conf.py -max-line-length = 115 -# Ignore some style 'errors' produced while formatting by 'black' -# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings -extend-ignore = E203 diff --git a/.github/ISSUE_TEMPLATE/bug_feature.md b/.github/ISSUE_TEMPLATE/bug_feature.md deleted file mode 100644 index b3454deb..00000000 --- a/.github/ISSUE_TEMPLATE/bug_feature.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Bug Report or Feature Request -about: Report a bug or suggest a new feature! -title: "" -labels: "" -assignees: "" ---- - -### Problem - - - -### Proposed solution diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md deleted file mode 100644 index 56c5fca3..00000000 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: Release -about: Checklist and communication channel for PyPI and GitHub release -title: "Ready for PyPI/GitHub release" -labels: "release" -assignees: "" ---- - -### PyPI/GitHub rc-release preparation checklist: - -- [ ] All PRs/issues attached to the release are merged. -- [ ] All the badges on the README are passing. -- [ ] License information is verified as correct. If you are unsure, please comment below. -- [ ] Locally rendered documentation contains all appropriate pages, tutorials, and other human-written text is up-to-date with any changes in the code. -- [ ] All API references are included. To check this, run `conda install scikit-package` and then `package build api-doc`. Review any edits made by rerendering the docs locally. -- [ ] Installation instructions in the README, documentation, and the website are updated. -- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version. -- [ ] Grammar and writing quality are checked (no typos). -- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release. -- [ ] Dispatch matrix testing to test the release on all Python versions and systems. If you do not have permission to run this workflow, tag the maintainer and say `@maintainer, please dispatch matrix testing workflow`. - -Please tag the maintainer (e.g., @username) in the comment here when you are ready for the PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here: - -### PyPI/GitHub full-release preparation checklist: - -- [ ] Create a new conda environment and install the rc from PyPI (`pip install ==??`) -- [ ] License information on PyPI is correct. -- [ ] Docs are deployed successfully to `https:///`. -- [ ] Successfully run all tests, tutorial examples or do functional testing. - -Please let the maintainer know that all checks are done and the package is ready for full release. - -### conda-forge release preparation checklist: - - - -- [ ] Ensure that the full release has appeared on PyPI successfully. -- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock. -- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions. -- [ ] Tag the maintainer for conda-forge release. - -### Post-release checklist - - - -- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments. -- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md deleted file mode 100644 index 1099d862..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ /dev/null @@ -1,15 +0,0 @@ -### What problem does this PR address? - - - -### What should the reviewer(s) do? - - - - diff --git a/.github/workflows/build-and-publish-docs-on-dispatch.yml b/.github/workflows/build-and-publish-docs-on-dispatch.yml deleted file mode 100644 index 406f5514..00000000 --- a/.github/workflows/build-and-publish-docs-on-dispatch.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build and Publish Docs on Dispatch - -on: - workflow_dispatch: - -jobs: - get-python-version: - uses: scikit-package/release-scripts/.github/workflows/_get-python-version-latest.yml@v0 - with: - python_version: 0 - - docs: - uses: scikit-package/release-scripts/.github/workflows/_release-docs.yml@v0 - with: - project: diffpy.pdffit2 - c_extension: true - headless: false - python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }} diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml deleted file mode 100644 index 28358806..00000000 --- a/.github/workflows/build-wheel-release-upload.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Build Wheel and Release - -# Trigger on tag push or manual dispatch. -# Tag and release privilege are verified inside the reusable workflow. -on: - workflow_dispatch: - push: - tags: - - "*" - -# ── Release modality ────────────────────────────────────────────────────────── -# Three options are provided below. Only ONE job should be active at a time. -# To switch: comment out the active job and uncomment your preferred option, -# then commit the change to main before tagging a release. -# ───────────────────────────────────────────────────────────────────────────── - -jobs: - # Option 1 (default): Release to GitHub, publish to PyPI, and deploy docs. - # - # The wheel is uploaded to PyPI so users can install with `pip install`. - # A GitHub release is created with the changelog as the release body, and - # the Sphinx documentation is rebuilt and deployed to GitHub Pages. - # - # Choose this for open-source packages distributed via PyPI and/or - # conda-forge where broad public availability is the goal. - build-release: - uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 - with: - project: diffpy.pdffit2 - c_extension: true - maintainer_github_username: sbillinge - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - PAT_TOKEN: ${{ secrets.PAT_TOKEN }} - - # Option 2: Release to GitHub and deploy docs, without publishing to PyPI. - # - # A GitHub release is created and the Sphinx docs are deployed, but the - # wheel is not uploaded to PyPI. The source code remains publicly visible - # on GitHub and can be installed directly from there. - # - # Choose this when the package is public but you prefer to keep it off the - # default pip index — for example, if you distribute via conda-forge only, - # or if the package is not yet ready for a permanent PyPI presence. - # - # To use: comment out Option 1 above and uncomment the lines below. - # build-release-no-pypi: - # uses: scikit-package/release-scripts/.github/workflows/_build-release-github-no-pypi.yml@v0 - # with: - # project: diffpy.pdffit2 - # c_extension: true - # maintainer_github_username: sbillinge - # secrets: - # PAT_TOKEN: ${{ secrets.PAT_TOKEN }} - - # Option 3: Release to GitHub with wheel, license, and instructions bundled - # as a downloadable zip attached to the GitHub release asset. - # - # The wheel is built and packaged together with INSTRUCTIONS.txt and the - # LICENSE file into a zip that is attached directly to the GitHub release. - # Users with access to the (private) repo download the zip, follow the - # instructions inside, and install locally with pip. No PyPI or conda-forge - # upload occurs, and no docs are deployed. - # - # Choose this for private or restricted packages where distribution must be - # controlled: only users with repo access can download the release asset, - # making the GitHub release itself the distribution channel. - # - # To use: comment out Option 1 above and uncomment the lines below. - # build-release-private: - # uses: scikit-package/release-scripts/.github/workflows/_build-release-github-private-pure.yml@v0 - # with: - # project: diffpy.pdffit2 - # maintainer_github_username: sbillinge - # secrets: - # PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml deleted file mode 100644 index 32130bee..00000000 --- a/.github/workflows/check-news-item.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Check for News - -on: - pull_request_target: - branches: - - main # GitHub does not evaluate expressions in trigger filters; edit this value if your base branch is not main - -jobs: - check-news-item: - uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0 - with: - project: diffpy.pdffit2 diff --git a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml deleted file mode 100644 index 16e00724..00000000 --- a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: CI - -on: - push: - branches: - - main - release: - types: - - prereleased - - published - workflow_dispatch: - -jobs: - matrix-coverage: - uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 - with: - project: diffpy.pdffit2 - c_extension: true - headless: false - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/matrix-and-codecov.yml b/.github/workflows/matrix-and-codecov.yml deleted file mode 100644 index 4a5a830d..00000000 --- a/.github/workflows/matrix-and-codecov.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Matrix and Codecov - -on: - # push: - # branches: - # - main - release: - types: - - prereleased - - published - workflow_dispatch: - -jobs: - matrix-coverage: - uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 - with: - project: diffpy.pdffit2 - c_extension: true - headless: false - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/publish-docs-on-release.yml b/.github/workflows/publish-docs-on-release.yml deleted file mode 100644 index 4af0c50e..00000000 --- a/.github/workflows/publish-docs-on-release.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Deploy Documentation on Release - -on: - workflow_dispatch: - -jobs: - docs: - uses: scikit-package/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0 - with: - project: diffpy.pdffit2 - c_extension: true - headless: false diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml deleted file mode 100644 index b0489e02..00000000 --- a/.github/workflows/tests-on-pr.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Tests on PR - -on: - pull_request: - workflow_dispatch: - -jobs: - tests-on-pr: - uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0 - with: - project: diffpy.pdffit2 - c_extension: true - headless: false - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 099e2948..00000000 --- a/.gitignore +++ /dev/null @@ -1,93 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -_build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -venv/ -*.egg-info/ -.installed.cfg -*.egg -bin/ -temp/ -tags/ -errors.err - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -MANIFEST - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Django stuff: -*.log - -# Sphinx documentation -docs/build/ -docs/source/generated/ - -# pytest -.pytest_cache/ - -# PyBuilder -target/ - -# Editor files -# mac -.DS_Store -*~ - -# vim -*.swp -*.swo - -# pycharm -.idea/ - -# VSCode -.vscode/ - -# Ipython Notebook -.ipynb_checkpoints diff --git a/.isort.cfg b/.isort.cfg deleted file mode 100644 index 7ce0fb1f..00000000 --- a/.isort.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[settings] -# Keep import statement below line_length character limit -line_length = 115 -multi_line_output = 3 -include_trailing_comma = True diff --git a/docs/source/_static/.placeholder b/.nojekyll similarity index 100% rename from docs/source/_static/.placeholder rename to .nojekyll diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 0e4a84d1..00000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,66 +0,0 @@ -default_language_version: - python: python3 -ci: - autofix_commit_msg: | - [pre-commit.ci] auto fixes from pre-commit hooks - autofix_prs: true - autoupdate_branch: "pre-commit-autoupdate" - autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" - autoupdate_schedule: monthly - skip: [no-commit-to-branch] - submodules: false -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace - - id: check-case-conflict - - id: check-merge-conflict - - id: check-toml - - id: check-added-large-files - - repo: https://github.com/psf/black - rev: 24.4.2 - hooks: - - id: black - - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 - hooks: - - id: flake8 - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - args: ["--profile", "black"] - - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 - hooks: - - id: nbstripout - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: no-commit-to-branch - name: Prevent Commit to Main Branch - args: ["--branch", "main"] - stages: [pre-commit] - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - additional_dependencies: - - tomli - # prettier - multi formatter for .json, .yml, and .md files - - repo: https://github.com/pre-commit/mirrors-prettier - rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 - hooks: - - id: prettier - additional_dependencies: - - "prettier@^3.2.4" - # docformatter - PEP 257 compliant docstring formatter - - repo: https://github.com/s-weigand/docformatter - rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c - hooks: - - id: docformatter - additional_dependencies: [tomli] - args: [--in-place, --config, ./pyproject.toml] diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index aaa88895..00000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 - -build: - os: "ubuntu-22.04" - tools: - python: "latest" - -python: - install: - - requirements: requirements/docs.txt - -sphinx: - configuration: docs/source/conf.py diff --git a/AUTHORS.rst b/AUTHORS.rst deleted file mode 100644 index 21affc26..00000000 --- a/AUTHORS.rst +++ /dev/null @@ -1,57 +0,0 @@ -Authors -======= - -Billinge Group and community contributors. - ----- - -This code was derived from the first PDFFIT program by Thomas Proffen. -The sources were converted to C++ by Jacques Bloch and then extensively hacked, -extended and purged from most glaring bugs by Chris Farrow and Pavol Juhas. -This code is currently maintained as part of the DiffPy project to create -python modules for structure investigations from diffraction data. - -The DiffPy team is located in the Billinge-group at the Applied Physics -and Applied Mathematics Department of the Columbia University in New York. -Previous significant contributors to this code were - - Pavol Juhas, Chris Farrow, Jacques Bloch, Wenduo Zhou - -Please see the github contributions and the header of each source file -for a detailed list of -contributors. This is an open-source project and we hope and expect -that the list of contributors will expand with time. Many thanks to -all current and future contributors! - -For more information on the DiffPy project email sbillinge@ucsb.edu - -DiffPy was initiated as part of the Distributed Data Analysis of Neutron -Scattering Experiments (DANSE) project, funded by the National Science -Foundation under grant DMR-0520547. More information on DANSE can be -found at http://danse.us. Any opinions, findings, and conclusions or -recommendations expressed in this material are those of the author(s) -and do not necessarily reflect the views of the NSF. - -Acknowledgments ---------------- - -We are truly grateful to all the people who have contributed, in all -different ways, to this project: Thomas Proffen, Xiangyun Qiu, Pete -Peterson and Jacques Bloch, previous Billinge-group members whose -contributions to the codes are living well beyond their affiliation with -the group; The hard working DANSE group at Caltech, University of -Maryland, Iowa State and University of Tennessee, especially Brent Fultz -for doggedly putting DANSE all together and Michael Aivazis, and the -indomitable Mike McKerns for their design input and MM's gargantuan -excel spreadsheets; The former members of the Billinge-group members, -especially HyunJeong Kim and Ahmad Masadeh for enthusiastic testing and -feature requests; Last but not least, our long suffering family members, -and the whole coffee and tea industries at large, without whom none of -this would have been possible. - - -Contributors ------------- - -For a list of contributors, visit -https://github.com/diffpy/diffpy.pdffit2/graphs/contributors diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index feba9007..00000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,96 +0,0 @@ -============= -Release notes -============= - -.. current developments - -1.6.0 -===== - - -1.5.2 -===== - -**Added:** - -* Add gsl to conda requirements. - -**Changed:** - -* Remove mac static GSL linking; always link to shared GSL. -* Change doc to docs for skpkg standard. - -**Fixed:** - -* Fix misspelled words in source code comments. -* Migrate documentation to `scikit-package 0.1.0` standards, including a mock import for API rendering. -* Add ``libsblas.dll`` to build pypi wheel in windows. - - -1.5.1 -===== - -**Fixed:** - -* Fixed `SystemError` and `MemoryError` for `redirect_stdout` on Windows with Python 3.13. - -**Removed:** - -* Removed `restore_stdout` function and wrapper. - - -1.5.0 -===== - -**Added:** - -* Python 3.11, 3.12 support -* Option to skip printing of introductory information when initializing the `PdfFit` class. -* Added additional runtime linker flags in `CustomBuildExt.run` to embed the `RPATH` flags for the built extensions. -* Support for retrieving GSL configuration from `CONDA_PREFIX`/ `GSL_PATH` on all platforms. -* Separate installation instruction for macOS (Arm64) in READEM -* Added `restore_stdout` function and wrapper. -* Added Python 3.13 support. - -**Changed:** - -* Changed setup.py to lazy evaluate gsl installation. -* Documentation brought up to date -* Merged the GSL configuration logic in `setup.py`. -* Changed `pytest` `capture_output` fixture. Now automatically restores `sys.stdout`. - -**Fixed:** - -* remove older conda-recipe files -* moved the tests directory from src to the root using conftest.py. -* fixed a circular import bug during " pip install ." in GitHub CI. -* renamed .py files under tests to snake_case. -* add PyPI packages under pip.txt -* re-cookiecutter to group's package standard -* Fix missing `__date__`, use PyPI release date. -* Fixed `SystemError` when running `pytest` on Windows with Python 3.13. - -**Removed:** - -* Python <= 3.10 support -* Six dependency and py2 support - - -1.4.2 -===== - -**Added:** - -* Support for Python 3.11, 3.12 - -**Changed:** - -* No notable functional changes from 1.4.1 - -1.4.4rc0 -======== - -**Fixed:** - -* Code linted to group flake8 standards -* Package structure moved to diffpy standard structure diff --git a/CODE-OF-CONDUCT.rst b/CODE-OF-CONDUCT.rst deleted file mode 100644 index 25fafe27..00000000 --- a/CODE-OF-CONDUCT.rst +++ /dev/null @@ -1,133 +0,0 @@ -===================================== - Contributor Covenant Code of Conduct -===================================== - -Our Pledge ----------- - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socioeconomic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -Our Standards -------------- - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -Enforcement Responsibilities ----------------------------- - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -Scope ------ - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official email address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -Enforcement ------------ - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -sbillinge@ucsb.edu. All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -Enforcement Guidelines ----------------------- - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -1. Correction -**************** - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -2. Warning -************* - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -3. Temporary Ban -****************** - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -4. Permanent Ban -****************** - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -Attribution ------------ - -This Code of Conduct is adapted from the `Contributor Covenant `_. - -Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder `_. - -For answers to common questions about this code of conduct, see the `FAQ `_. `Translations are available `_ diff --git a/LICENSE.rst b/LICENSE.rst deleted file mode 100644 index 725077f9..00000000 --- a/LICENSE.rst +++ /dev/null @@ -1,46 +0,0 @@ -License -####### - -This program is part of the DiffPy and DANSE open-source projects -and is available subject to the conditions and terms laid out below. - -If you use this program to do productive scientific research that leads -to publication, we ask that you acknowledge use of the program by citing -the following paper in your publication: - - C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen - and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure - in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007) - -Copyright 2006-2007, Board of Trustees of Michigan State University, -Copyright 2008-2026, Board of Trustees of Columbia University in the -city of New York. (Copyright holder indicated in each source file). - -For more information please visit the project web-page: - http://www.diffpy.org/ -or email Prof. Simon Billinge at sb2896@columbia.edu - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index f1a78eec..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,12 +0,0 @@ -graft src -graft tests -graft requirements - -include AUTHORS.rst LICENSE*.rst README.rst - -# Exclude all bytecode files and __pycache__ directories -global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files. -global-exclude .DS_Store # Exclude Mac filesystem artifacts. -global-exclude __pycache__ # Exclude Python cache directories. -global-exclude .git* # Exclude git files and directories. -global-exclude .idea # Exclude PyCharm project settings. diff --git a/README.rst b/README.rst deleted file mode 100644 index f308a906..00000000 --- a/README.rst +++ /dev/null @@ -1,186 +0,0 @@ -|Icon| |title|_ -=============== - -.. |title| replace:: diffpy.pdffit2 -.. _title: https://diffpy.github.io/diffpy.pdffit2 - -.. |Icon| image:: https://avatars.githubusercontent.com/diffpy - :target: https://diffpy.github.io/diffpy.pdffit2 - :height: 100px - -|PyPI| |Forge| |PythonVersion| |PR| - -|CI| |Codecov| |Black| |Tracking| - -.. |Black| image:: https://img.shields.io/badge/code_style-black-black - :target: https://github.com/psf/black - -.. |CI| image:: https://github.com/diffpy/diffpy.pdffit2/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg - :target: https://github.com/diffpy/diffpy.pdffit2/actions/workflows/matrix-and-codecov-on-merge-to-main.yml - -.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.pdffit2/branch/main/graph/badge.svg - :target: https://codecov.io/gh/diffpy/diffpy.pdffit2 - -.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.pdffit2 - :target: https://anaconda.org/conda-forge/diffpy.pdffit2 - -.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff - :target: https://github.com/diffpy/diffpy.pdffit2/pulls - -.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.pdffit2 - :target: https://pypi.org/project/diffpy.pdffit2/ - -.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.pdffit2 - :target: https://pypi.org/project/diffpy.pdffit2/ - -.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue - :target: https://github.com/diffpy/diffpy.pdffit2/issues - -PDFfit2 - real space structure refinement of the atomic pair distribution function - -The diffpy.pdffit2 package provides functions for the calculation and -refinement of atomic Pair Distribution Functions (PDF) from crystal -structure models. It is used as a computational engine by PDFgui. All -refinements possible in PDFgui can be done by writing python scripts -directly with diffpy.pdffit2, -although less conveniently and with a fair knowledge of Python. -However, we recommend using `diffpy-cmi -`_ for carrying -out more advanced, python-scripted refinements of nanostructure. - -The PDFfit2 package includes an extension for the interactive `IPython -`_ shell, these days commonly used within -Jupyter notebooks, which tries to mimic the old PDFFIT -program. To start IPython with this extension and also with plotting -functions enabled, use :: - - ipython --ext=diffpy.pdffit2.ipy_ext --pylab - -The IPython extension is suitable for interactive use, however -refinement scripts should be preferably written as a standard -Python code. This is more reliable and needs only a few extra -statements. - -To learn more about diffpy.pdffit2 library, see the examples directory -included in this distribution or the API documentation at -http://www.diffpy.org/doc/pdffit2. - -For more information about the diffpy.pdffit2 library, please consult our `online documentation `_. - -Citation --------- - -If you use diffpy.pdffit2 in a scientific publication, we would like you to cite the following paper: - - C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen - and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure - in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007) - -Installation ------------- - -diffpy.pdffit2 supports Python 3.12, 3.13, and 3.14. - -Windows, macOS (non-Arm64), Linux -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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.pdffit2_env`` :: - - conda create -n diffpy.pdffit2_env diffpy.pdffit2 - conda activate diffpy.pdffit2_env - -To confirm that the installation was successful, type :: - - python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)" - -macOS (Arm64) -~~~~~~~~~~~~~ - -Create a new conda environment ``diffpy.pdffit2_env``: :: - - conda create -n diffpy.pdffit2_env python=3.13 - -Activate the environment: :: - - conda activate diffpy.pdffit2_env - -Install pdffit2 using ``pip`` to download and install the latest version from `Python Package Index `_: :: - - pip install diffpy.pdffit2 - -If you prefer to install from sources, after installing the dependencies, obtain the source archive from -`GitHub `_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory -and run the following :: - - pip install . - - -You can type the following command to verify the installation is successful. :: - - python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)" - - -Getting Started ---------------- - -You may consult our `online documentation `_ for tutorials and API references. - -Support and Contribute ----------------------- - -PDFfit2 is not developed anymore and is only maintained due to its -status of a sole computational engine for PDFgui. We don't expect any -major developments to the code beyond simple bug fixes and compatibility -features. The source code to PDFfit2 is available in a git repository -at https://github.com/diffpy/diffpy.pdffit2. - -For an actively developed codes for PDF simulations see the -DiffPy-CMI framework at http://www.diffpy.org. - ----- - -`Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.pdffit2. Please join the diffpy.pdffit2 users community by joining the Google group. The diffpy.pdffit2 project welcomes your expertise and enthusiasm! - -If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. - -Feel free to fork the project and contribute. To install diffpy.pdffit2 -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 . - -To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit -hooks. - -1. Install pre-commit in your working environment by running ``conda install pre-commit``. - -2. Initialize pre-commit (one time only) ``pre-commit install``. - -Thereafter your code will be linted by black and isort and checked against flake8 before you can commit. -If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should -pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before -trying to commit again. - -Improvements and fixes are always appreciated. - -Before contributing, please read our `Code of Conduct `_. - -Contact -------- - -For more information on diffpy.pdffit2 please visit the project `web-page `_ or email Simon Billinge at sb2896@columbia.edu. - -Acknowledgements ----------------- - -``diffpy.pdffit2`` is built and maintained with `scikit-package `_. diff --git a/docs/source/examples/Ni.stru b/_downloads/013300f3620019485548697445e5b47a/Ni.stru similarity index 100% rename from docs/source/examples/Ni.stru rename to _downloads/013300f3620019485548697445e5b47a/Ni.stru diff --git a/docs/source/examples/Ni_refinement.py b/_downloads/019d6e377cbbff298dd5aa4d545daaec/Ni_refinement.py old mode 100755 new mode 100644 similarity index 100% rename from docs/source/examples/Ni_refinement.py rename to _downloads/019d6e377cbbff298dd5aa4d545daaec/Ni_refinement.py diff --git a/docs/source/examples/Ni-xray.gr b/_downloads/85ac69738d68cc2e3c9285cda5d05d58/Ni-xray.gr similarity index 100% rename from docs/source/examples/Ni-xray.gr rename to _downloads/85ac69738d68cc2e3c9285cda5d05d58/Ni-xray.gr diff --git a/docs/source/examples/Ni_calculation.py b/_downloads/9b61989d5c869cb77d4c6f7fb4d6fc53/Ni_calculation.py old mode 100755 new mode 100644 similarity index 100% rename from docs/source/examples/Ni_calculation.py rename to _downloads/9b61989d5c869cb77d4c6f7fb4d6fc53/Ni_calculation.py diff --git a/_modules/diffpy/pdffit2/output.html b/_modules/diffpy/pdffit2/output.html new file mode 100644 index 00000000..1dff367b --- /dev/null +++ b/_modules/diffpy/pdffit2/output.html @@ -0,0 +1,151 @@ + + + + + + + + diffpy.pdffit2.output — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.pdffit2.output

+#!/usr/bin/env python
+##############################################################################
+#
+# pdffit2           by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE.txt for license information.
+#
+##############################################################################
+"""Take care of sending engine output to given file-like object.
+
+The output file is stored in local module variable stdout.
+"""
+
+
+# create module variable stdout
+
+from sys import stdout as stdout
+
+# silence pyflakes checker
+assert stdout
+
+
+
+[docs] +def redirect_stdout(dst): + """Redirect PDFfit2 standard output to a file-like object dst. + + The dst value is stored in module variable stdout. + """ + from diffpy.pdffit2.pdffit2 import redirect_stdout + + redirect_stdout(dst) + global stdout + stdout = dst + return
+ + + +# End of file +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/pdffit2/pdffit.html b/_modules/diffpy/pdffit2/pdffit.html new file mode 100644 index 00000000..84121c9a --- /dev/null +++ b/_modules/diffpy/pdffit2/pdffit.html @@ -0,0 +1,1707 @@ + + + + + + + + diffpy.pdffit2.pdffit — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.pdffit2.pdffit

+#!/usr/bin/env python
+##############################################################################
+#
+# pdffit2           by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Chris Farros, Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE.txt for license information.
+#
+##############################################################################
+"""PdfFit class for fitting a structural model to PDF data."""
+
+from __future__ import print_function
+
+import itertools
+import numbers
+
+# Load pdffit2 and output modules to the current namespace.
+# Note that "import diffpy.pdffit2.output as output" would
+# crash with AttributeError when executed during imports of
+# parent packages.
+from diffpy.pdffit2 import output, pdffit2
+
+# helper routines
+
+
+def _format_value_std(value, stdev):
+    """Convert value to a string with standard deviation in brackets.
+
+    value -- a number
+    stdev -- standard deviation.  Ignored when small compared to value.
+
+    Return string.
+    """
+    if stdev > abs(value) * 1e-8:
+        s = "%g (%g)" % (value, stdev)
+    elif str(stdev) == "nan":
+        s = "%g (NaN)" % value
+    else:
+        s = "%g" % value
+    return s
+
+
+def _format_bond_length(dij, ddij, ij1, symij):
+    """Return string with formatted bond length info for a pair of
+    atoms.
+
+    dij     -- distance between atoms i and j
+    ddij    -- standard deviation of dij.  Ignored when small relative to dij.
+    ij1     -- tuple of atom indices starting at 1
+    symij   -- tuple of atom symbols
+
+    Return formatted string.
+    """
+    w_smbidx = 10
+    w_equals = 30
+    s0 = "%s (#%i)" % (symij[0], ij1[0])
+    s1 = "%s (#%i)" % (symij[1], ij1[1])
+    leader0 = "   " + s0.ljust(w_smbidx) + " -   " + s1 + " "
+    leader1 = leader0.ljust(w_equals) + "=   "
+    s = leader1 + _format_value_std(dij, ddij) + " A"
+    return s
+
+
+def _convertCallable(var):
+    """Convert an object to the result of its call when callable.
+
+    var -- string or callable object that returns string
+
+    Return var or var().
+    """
+    if callable(var):
+        rv = var()
+    else:
+        rv = var
+    return rv
+
+
+# constants
+
+__intro_message__ = """
+******************************************************************************
+*                      P D F F I T   Version   %(version)s                   *
+*                                              %(date)s                      *
+* -------------------------------------------------------------------------- *
+* (c) 1998-2007 Trustees of the Michigan State University.                   *
+* (c) 2008-%(year)s Trustees of the Columbia University                      *
+*               in the city of New York.                                     *
+*                                                                            *
+* Authors:                                                                   *
+*     Thomas Proffen        -   Email: tproffen@lanl.gov                     *
+*     Jacques Bloch         -   Email: bloch@pa.msu.edu                      *
+*     Christopher Farrow    -   Email: clf2121@columbia.edu                  *
+*     Pavol Juhas           -   Email: pjuhas@bnl.gov                        *
+*     Simon Billinge        -   Email: sb2896@columbia.edu                   *
+******************************************************************************
+"""
+
+
+##############################################################################
+
+
+
+[docs] +class PdfFit(object): + """Class for handling PdfFit calculations and refinements. + + Attributes + ---------- + stru_files : list + The list to store structure files. + data_files : list + The list to store data files. + """ + + # constants and enumerators from pdffit.h: + # selection of all atoms + selalias = {"ALL": -1} + # constraint type identifiers + FCON = {"USER": 0, "IDENT": 1, "FCOMP": 2, "FSQR": 3} + # scattering type identifiers + Sctp = {"X": 0, "N": 1} + + def _exportAll(self, namespace): + """_exportAll(self, namespace) --> Export all 'public' class + methods into namespace. + + This function allows for a module-level PdfFit object which + doesn't have to be referenced when calling a method. This + function makes old (python) scripts compatible with this class. + At the top of the script, create a pdffit object, and then call + this method. Usually, namespace = locals(). + """ + # string aliases (var = "var") + for a in itertools.chain(self.selalias, self.FCON, self.Sctp): + exec("%s = %r" % (a, a), namespace) + public = [ + a + for a in dir(self) + if "__" not in a + and a not in ["_handle", "_exportAll", "selalias", "FCON", "Sctp"] + ] + for funcname in public: + namespace[funcname] = getattr(self, funcname) + return + +
+[docs] + def intro(): + """Show introductory message.""" + import re + + from diffpy.pdffit2 import __date__, __version__ + + date = __date__[:10] + d = {"version": __version__, "date": date, "year": date[:4] or "2019"} + msg = __intro_message__ % d + + def filler(mx): + return mx.group(0).rstrip(" *").ljust(77) + "*" + + msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) + print(msg_ljust, file=output.stdout) + return
+ + + intro = staticmethod(intro) + +
+[docs] + def add_structure(self, stru): + """add_structure(stru) --> Add new structure to PdfFit instance. + + stru -- instance of Structure class from diffpy.structure. + + No return value. + Raises pdffit2.structureError when stru contains unknown + atom species. + """ + s = stru.writeStr("pdffit") + self.read_struct_string(s) + return
+ + +
+[docs] + def read_struct(self, struct): + """read_struct(struct) --> Read structure from file into memory. + + struct -- name of file from which to read structure + + Raises: + pdffit2.calculationError when a lattice cannot be created from the + given structure + pdffit2.structureError when a structure file is malformed + IOError when the file cannot be read from the disk + """ + pdffit2.read_struct(self._handle, struct) + self.stru_files.append(struct) + return
+ + +
+[docs] + def read_struct_string(self, struct, name=""): + """read_struct_string(struct, name = "") --> Read structure from + a string into memory. + + struct -- string containing the contents of the structure file + name -- tag with which to label structure + + Raises: + pdffit2.calculationError when a lattice cannot be created from the + given structure + pdffit2.structureError when a structure file is malformed + """ + pdffit2.read_struct_string(self._handle, struct) + self.stru_files.append(name) + return
+ + +
+[docs] + def read_data(self, data, stype, qmax, qdamp): + """read_data(data, stype, qmax, qdamp) --> Read pdf data from + file into memory. + + data -- name of file from which to read data + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + + Raises: IOError when the file cannot be read from disk + """ + pdffit2.read_data(self._handle, data, stype.encode(), qmax, qdamp) + self.data_files.append(data) + return
+ + +
+[docs] + def read_data_string(self, data, stype, qmax, qdamp, name=""): + """read_data_string(data, stype, qmax, qdamp, name = "") --> + Read pdf data from a string into memory. + + data -- string containing the contents of the data file + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + name -- tag with which to label data + """ + pdffit2.read_data_string( + self._handle, data, stype.encode(), qmax, qdamp, name + ) + name = data + self.data_files.append(name) + return
+ + +
+[docs] + def read_data_lists( + self, stype, qmax, qdamp, r_data, Gr_data, dGr_data=None, name="list" + ): + """read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data + = None, name = "list") --> Read pdf data into memory from lists. + + All lists must be of the same length. + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + r_data -- list of r-values + Gr_data -- list of G(r) values + dGr_data -- list of G(r) uncertainty values + name -- tag with which to label data + + Raises: ValueError when the data lists are of different length + """ + pdffit2.read_data_arrays( + self._handle, + stype.encode(), + qmax, + qdamp, + r_data, + Gr_data, + dGr_data, + name, + ) + self.data_files.append(name) + return
+ + +
+[docs] + def pdfrange(self, iset, rmin, rmax): + """Pdfrange(iset, rmin, rmax) --> Set the range of the fit. + + iset -- data set to consider + rmin -- minimum r-value of fit + rmax -- maximum r-value of fit + + Raises: ValueError for bad input values + """ + pdffit2.pdfrange(self._handle, iset, rmin, rmax) + return
+ + +
+[docs] + def reset(self): + """Reset() --> Clear all stored fit, structure, and parameter + data.""" + self.stru_files = [] + self.data_files = [] + pdffit2.reset(self._handle) + return
+ + +
+[docs] + def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): + """Alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space + for a PDF calculation. + + The structure from which to calculate the PDF must first be imported + with the read_struct() or read_struct_string() method. + + stype -- 'X' (xray) or 'N' (neutron) + qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. + qdamp -- instrumental Q-resolution factor + rmin -- minimum r-value of calculation + rmax -- maximum r-value of calculation + bin -- number of data points in calculation + + Raises: + ValueError for bad input values + pdffit.unassignedError when no structure has been loaded + """ + pdffit2.alloc( + self._handle, stype.encode(), qmax, qdamp, rmin, rmax, bin + ) + return
+ + +
+[docs] + def calc(self): + """Calc() --> Calculate the PDF of the imported structure. + + Space for the calculation must first be allocated with the alloc() + method. + + Raises: + pdffit2.calculationError when allocated space cannot + accommodate calculation + pdffit.unassignedError when space for calculation has not been + allocated + """ + pdffit2.calc(self._handle) + return
+ + +
+[docs] + def refine(self, toler=0.00000001): + """Refine(toler = 0.00000001) --> Fit the theory to the imported + data. + + toler -- tolerance of the fit + + Raises: + pdffit2.calculationError when the model pdf cannot be calculated + pdffit2.constraintError when refinement fails due to bad + constraint + pdffit2.unassigedError when a constraint used but never initialized + using setpar() + """ + step = 0 + finished = 0 + while not finished: + finished = pdffit2.refine_step(self._handle, toler) + step += 1 + return
+ + +
+[docs] + def refine_step(self, toler=0.00000001): + """refine_step(toler = 0.00000001) --> Run a single step of the + fit. + + toler -- tolerance of the fit + + Raises: + pdffit2.calculationError when the model pdf cannot be calculated + pdffit2.constraintError when refinement fails due to bad + constraint + pdffit2.unassigedError when a constraint used but never initialized + using setpar() + + Returns: 1 (0) if refinement is (is not) finished + """ + self.finished = pdffit2.refine_step(self._handle, toler) + return self.finished
+ + +
+[docs] + def save_pdf(self, iset, fname): + """save_pdf(iset, fname) --> Save calculated or fitted PDF to + file. + + iset -- data set to save + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if the data set is undefined + """ + pdffit2.save_pdf(self._handle, iset, fname) + return
+ + +
+[docs] + def save_pdf_string(self, iset): + """save_pdf_string(iset) --> Save calculated or fitted PDF to + string. + + iset -- data set to save + + Raises: + pdffit2.unassignedError if the data set is undefined + + Returns: string containing contents of save file + """ + pdffilestring = pdffit2.save_pdf(self._handle, iset, "") + return pdffilestring
+ + +
+[docs] + def save_dif(self, iset, fname): + """save_dif(iset, fname) --> Save data and fitted PDF difference + to file. + + iset -- data set to save + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if the data set is undefined + """ + pdffit2.save_dif(self._handle, iset, fname) + return
+ + +
+[docs] + def save_dif_string(self, iset): + """save_dif_string(iset) --> Save data and fitted PDF difference + to string. + + iset -- data set to save + + Raises: + pdffit2.unassignedError if the data set is undefined + + Returns: string containing contents of save file + """ + diffilestring = pdffit2.save_dif(self._handle, iset, "") + return diffilestring
+ + +
+[docs] + def save_res(self, fname): + """save_res(fname) --> Save fit-specific data to file. + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if there is no refinement data to save + """ + pdffit2.save_res(self._handle, fname) + return
+ + +
+[docs] + def save_res_string(self): + """save_res_string() --> Save fit-specific data to a string. + + Raises: + pdffit2.unassignedError if there is no refinement data to save + + Returns: string containing contents of save file + """ + resfilestring = pdffit2.save_res(self._handle, "") + return resfilestring
+ + +
+[docs] + def get_structure(self, ip): + """get_structure(ip) --> Get a copy of specified phase data. + + ip -- index of existing PdfFit phase starting from 1 + + Return Structure object from diffpy.structure. + Raise pdffit2.unassignedError if phase ip is undefined. + """ + from diffpy.structure import PDFFitStructure + + s = self.save_struct_string(ip) + stru = PDFFitStructure() + stru.readStr(s, "pdffit") + return stru
+ + +
+[docs] + def save_struct(self, ip, fname): + """save_struct(ip, fname) --> Save structure resulting from fit + to file. + + ip -- phase to save + + Raises: + IOError if file cannot be saved + pdffit2.unassignedError if the data set is undefined + """ + pdffit2.save_struct(self._handle, ip, fname) + return
+ + +
+[docs] + def save_struct_string(self, ip): + """save_struct(ip) --> Save structure resulting from fit to + string. + + ip -- phase to save + + Raises: + pdffit2.unassignedError if phase ip is undefined. + + Returns: string containing contents of save file + """ + structfilestring = pdffit2.save_struct(self._handle, ip, "") + return structfilestring
+ + +
+[docs] + def show_struct(self, ip): + """show_struct(ip) --> Print structure resulting from fit. + + ip -- phase to display + + Raises: pdffit2.unassignedError if the phase is undefined + """ + pdffit2.show_struct(self._handle, ip) + return
+ + +
+[docs] + def constrain(self, var, par, fcon=None): + """Constrain(var, par[, fcon]) --> Constrain a variable to a + parameter. + + A variable can be constrained to a number or equation string. + + :param var: variable to constrain, such as x(1) + :param par: parameter which to constrain the variable. This can be an + integer or an equation string containing a reference to + another parameter. Equation strings use standard C++ + syntax. The value of a constrained parameter is accessed + as ``@p`` in an equation string, where ``p`` is the + parameter. + :type par: int or str + :param fcon: 'USER', 'IDENT', 'FCOMP', or 'FSQR'. This is an optional + parameter; usage is currently unclear. + :type fcon: str + + Example:: + + >>> constrain(x(1), 1) + >>> constrain(x(2), "0.5+@1") + + :raises pdffit2.constraintError: if a constraint is bad + :raises pdffit2.unassignedError: if variable does not yet exist + :raises ValueError: if variable index does not exist (e.g. lat(7)) + """ + + var_ref = self.__getRef(var) + varnc = _convertCallable(var) + if fcon: + fc = self.FCON[fcon] + pdffit2.constrain_int(self._handle, var_ref, varnc, par, fc) + elif isinstance(par, str): + pdffit2.constrain_str(self._handle, var_ref, varnc, par) + else: + pdffit2.constrain_int(self._handle, var_ref, varnc, par) + return
+ + +
+[docs] + def setpar(self, par, val): + """Setpar(par, val) --> Set value of constrained parameter. + + val -- Either a numerical value or a reference to a variable + + Raises: + pdffit2.unassignedError when variable is yet to be assigned + """ + # people do not use parenthesis, e.g., "setpar(3, qdamp)" + # in such case val is a reference to PdfFit method + val = _convertCallable(val) + try: + val = float(val) + pdffit2.setpar_dbl(self._handle, par, val) + except ValueError: + var_ref = self.__getRef(val) + pdffit2.setpar_RV(self._handle, par, var_ref) + return
+ + +
+[docs] + def setvar(self, var, val): + """Setvar(var, val) --> Set the value of a variable. + + Raises: + pdffit2.unassignedError if variable does not yet exist + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_ref = self.__getRef(var) + pdffit2.setvar(self._handle, var_ref, val) + return
+ + +
+[docs] + def getvar(self, var): + """Getvar(var) --> Get stored value of a variable. + + Raises: + pdffit2.unassignedError if variable does not yet exist + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_ref = self.__getRef(var) + retval = pdffit2.getvar(self._handle, var_ref) + return retval
+ + +
+[docs] + def getrw(self): + """Getrw() --> Get normalized total error of the fit rw. + + getrw calculates total fit error summed for all datasets in the + fit. + + Return float. + """ + rw = pdffit2.getrw(self._handle) + return rw
+ + +
+[docs] + def getcrw(self): + """Getcrw() --> Get cumulative Rw for the current dataset. + + Cumulative Rw is a list of Rw partial sums cost values evaluated against + observed PDF data in the error sums evaluated against + the r-points in the fit. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of crw points, equidistant in r or empty list + if the refine function has not been called yet. + """ + crw = pdffit2.getcrw(self._handle) + return crw
+ + +
+[docs] + def getR(self): + """GetR() --> Get r-points used in the fit. + + This function should only be called after data has been loaded or + calculated. Before a refinement, the list of r-points will reflect the + data. Afterwards, they will reflect the fit range. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of equidistance r-points used in fit. + """ + R = pdffit2.getR(self._handle) + return R
+ + +
+[docs] + def getpdf_fit(self): + """getpdf_fit() --> Get fitted PDF. + + This function should only be called after a refinement or refinement + step has been done. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of fitted points, equidistant in r. + """ + pdfdata = pdffit2.getpdf_fit(self._handle) + return pdfdata
+ + +
+[docs] + def getpdf_obs(self): + """getpdf_obs() --> Get observed PDF. + + This function should only be called after data has been loaded or + calculated. Before a refinement, the list of r-points will reflect the + data. Afterwards, they will reflect the fit range. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of data points, equidistant in r. + """ + pdfdata = pdffit2.getpdf_obs(self._handle) + return pdfdata
+ + +
+[docs] + def getpdf_diff(self): + """Obtain difference between observed and fitted PDF. + + This function should only be called after data has been loaded or + calculated. Before a refinement, the list of r-points will reflect the + data. Afterwards, they will reflect the fit range. + + Raises: pdffit2.unassignedError if no data exists + + Returns: List of data points, equidistant in r. + """ + Gdiff = pdffit2.getpdf_diff(self._handle) + return Gdiff
+ + +
+[docs] + def get_atoms(self, ip=None): + """get_atoms() --> Get element symbols of all atoms in the + structure. + + ip -- index of phase to get the elements from (starting from 1) + when ip is not given, use current phase + + This function should only be called after a structure has been loaded. + + Raises: pdffit2.unassignedError if no structure exists + + Returns: List of atom names in structure. + """ + if ip is None: + rv = pdffit2.get_atoms(self._handle) + else: + rv = pdffit2.get_atoms(self._handle, ip) + return rv
+ + +
+[docs] + def get_atom_types(self, ip=None): + """get_atom_types() --> Ordered unique element symbols in the + structure. + + ip -- index of phase to get the elements from (starting from 1) + when ip is not given, use current phase + + This function should only be called after a structure has been loaded. + + Raises: + pdffit2.unassignedError if no structure exists + + Returns: List of unique atom symbols as they occur in structure. + """ + if ip is None: + rv = pdffit2.get_atom_types(self._handle) + else: + rv = pdffit2.get_atom_types(self._handle, ip) + return rv
+ + +
+[docs] + def getpar(self, par): + """Getpar(par) --> Get value of parameter. + + Raises: ValueError if parameter does not exists + """ + return pdffit2.getpar(self._handle, par)
+ + +
+[docs] + def fixpar(self, par): + """Fixpar(par) --> Fix a parameter. + + Fixed parameters are not fitted in a refinement. Passed parameter + can be 'ALL', in which case all parameters are fixed. + + Raises: pdffit.unassignedError when parameter has not been assigned + """ + if isinstance(par, str) and par.upper() in self.selalias: + par = self.selalias[par.upper()] + pdffit2.fixpar(self._handle, par) + return
+ + +
+[docs] + def freepar(self, par): + """Freepar(par) --> Free a parameter. + + Freed parameters are fitted in a refinement. Passed parameter + can be 'ALL', in which case all parameters are freed. + + Raises: pdffit.unassignedError when parameter has not been assigned + """ + if isinstance(par, str) and par.upper() in self.selalias: + par = self.selalias[par.upper()] + pdffit2.freepar(self._handle, par) + return
+ + +
+[docs] + def setphase(self, ip): + """Setphase(ip) --> Switch to phase ip. + + ip -- index of the phase starting at 1. + + All parameters assigned after this method is called refer only to the + current phase. + + Raises: pdffit.unassignedError when phase does not exist + """ + pdffit2.setphase(self._handle, ip) + return
+ + +
+[docs] + def setdata(self, iset): + """Setdata(iset) --> Set the data set in focus. + + iset -- integer index of data set starting at 1. + + Raises: pdffit.unassignedError when data set does not exist + """ + pdffit2.setdata(self._handle, iset) + return
+ + +
+[docs] + def psel(self, ip): + """Psel(ip) --> Include phase ip in calculation of total PDF. + + psel('ALL') selects all phases for PDF calculation. + + Raises: pdffit2.unassignedError if selected phase does not exist + """ + if isinstance(ip, str) and ip.upper() in self.selalias: + ip = self.selalias[ip.upper()] + pdffit2.psel(self._handle, ip) + return
+ + +
+[docs] + def pdesel(self, ip): + """Pdesel(ip) --> Exclude phase ip from calculation of total + PDF. + + pdesel('ALL') excludes all phases from PDF calculation. + + Raises: pdffit2.unassignedError if selected phase does not exist + """ + if isinstance(ip, str) and ip.upper() in self.selalias: + ip = self.selalias[ip.upper()] + pdffit2.pdesel(self._handle, ip) + return
+ + +
+[docs] + def selectAtomType(self, ip, ijchar, symbol, flag): + """Configure partial PDF - mark the specified atom type in phase ip + as included or excluded as a first or second in pair for distance + evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + symbol -- element symbol + flag -- bool flag, True for selection, False for exclusion + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError for invalid value of ijchar + """ + pdffit2.selectAtomType(self._handle, ip, ijchar.encode(), symbol, flag) + return
+ + +
+[docs] + def selectAtomIndex(self, ip, ijchar, aidx, flag): + """Configure partial PDF - mark the atom of given index in phase ip + as included or excluded as a first or second in pair for distance + evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + aidx -- integer index of atom starting at 1 + flag -- bool flag, True for selection, False for exclusion + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError if atom index or ijchar are invalid + """ + pdffit2.selectAtomIndex(self._handle, ip, ijchar.encode(), aidx, flag) + return
+ + +
+[docs] + def selectAll(self, ip, ijchar): + """Configure partial PDF - include all atoms of phase ip as first or + second element in pair for distance evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError if ijchar is invalid + """ + pdffit2.selectAll(self._handle, ip, ijchar.encode()) + return
+ + +
+[docs] + def selectNone(self, ip, ijchar): + """Configure partial PDF - exclude all atoms of phase ip from first + or second element of pair distance evaluation. + + ip -- phase index starting at 1 + ijchar -- 'i' or 'j' for first or second in pair + + Raises: + pdffit2.unassignedError if selected phase does not exist + ValueError if ijchar is invalid + """ + pdffit2.selectNone(self._handle, ip, ijchar.encode()) + return
+ + +
+[docs] + def bang(self, i, j, k): + """Bang(i, j, k) --> Show bond angle defined by atoms i, j, k. + + No return value. Use bond_angle() to get the result. + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded + """ + angle, stdev = pdffit2.bond_angle(self._handle, i, j, k) + # indices should be already checked here by bond_angle + atom_symbols = self.get_atoms() + leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % ( + atom_symbols[i - 1], + i, + atom_symbols[j - 1], + j, + atom_symbols[k - 1], + k, + ) + s = leader + _format_value_std(angle, stdev) + " degrees" + print(s, file=output.stdout) + return
+ + +
+[docs] + def bond_angle(self, i, j, k): + """bond_angle(i, j, k) --> bond angle defined by atoms i, j, k. + Angle is calculated using the shortest ji and jk lengths with + respect to periodic boundary conditions. + + i, j, k -- atom indices starting at 1 + + Return a tuple of (angle, angle_error), both values are in degrees. + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded + """ + rv = pdffit2.bond_angle(self._handle, i, j, k) + return rv
+ + +
+[docs] + def blen(self, *args): + """Blen(i, j) --> Show bond length defined by atoms i and j. + + i -- index of the first atom starting at 1 + j -- index of the second atom starting at 1 + + No return value. Use bond_length_atoms() to retrieve result. + + Second form: + + blen(a1, a2, lb, ub) --> Show sorted lengths of all a1-a2 bonds. + + a1 -- symbol of the first element in pair or "ALL" + a2 -- symbol of the second element in pair or "ALL" + lb -- lower bond length boundary + ub -- upper bond length boundary + + No return value. Use bond_length_types() to retrieve results. + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded + """ + # first form + if len(args) == 2: + dij, ddij = self.bond_length_atoms(*args[0:2]) + atom_symbols = self.get_atoms() + ij = (args[0], args[1]) + # indices were already checked in bond_length_atoms call + assert (0 <= min(ij) - 1) and (max(ij) - 1 < len(atom_symbols)) + symij = ( + atom_symbols[ij[0] - 1].upper(), + atom_symbols[ij[1] - 1].upper(), + ) + print( + _format_bond_length(dij, ddij, ij, symij), file=output.stdout + ) + # second form + elif len(args) == 4: + a1, a2, lb, ub = args + try: + atom_types = self.get_atom_types() + if isinstance(a1, numbers.Integral): + a1 = atom_types[a1 - 1] + if isinstance(a2, numbers.Integral): + a2 = atom_types[a2 - 1] + except IndexError: + # index of non-existent atom type + return + # arguments are OK here, get bond length dictionary + bld = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) + s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % ( + a1, + a2, + lb, + ub, + ) + print(s, file=output.stdout) + atom_symbols = self.get_atoms() + npts = len(bld["dij"]) + for idx in range(npts): + dij = bld["dij"][idx] + ddij = bld["ddij"][idx] + ij0 = bld["ij0"][idx] + ij1 = bld["ij1"][idx] + symij = (atom_symbols[ij0[0]], atom_symbols[ij0[1]]) + s = _format_bond_length(dij, ddij, ij1, symij) + print(s, file=output.stdout) + print(file=output.stdout) + if not bld["dij"]: + print(" *** No pairs found ***", file=output.stdout) + else: + emsg = "blen() takes 2 or 4 arguments (%i given)" % len(args) + raise TypeError(emsg) + # done + return
+ + +
+[docs] + def bond_length_atoms(self, i, j): + """bond_length_atoms(i, j) --> shortest distance between atoms + i, j. Periodic boundary conditions are applied to find the + shortest bond. + + i -- index of the first atom starting at 1 + j -- index of the second atom starting at 1 + + Return a tuple of (distance, distance_error). + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded. + """ + rv = pdffit2.bond_length_atoms(self._handle, i, j) + return rv
+ + +
+[docs] + def bond_length_types(self, a1, a2, lb, ub): + """bond_length_types(a1, a2, lb, ub) --> get all a1-a2 + distances. + + a1 -- symbol of the first element in pair or "ALL" + a2 -- symbol of the second element in pair or "ALL" + lb -- lower bond length boundary + ub -- upper bond length boundary + + Return a dictionary of distance data containing + + dij : list of bond lengths within given bounds + ddij : list of bond length standard deviations + ij0 : pairs of atom indices starting from 0 + ij1 : pairs of atom indices starting from 1 + + Raises: ValueError if selected atom(s) does not exist + pdffit.unassignedError when no structure has been loaded. + """ + rv = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) + return rv
+ + +
+[docs] + def show_scat(self, stype): + """show_scat(stype) --> Print scattering length for all atoms in + the current phase. + + stype -- 'X' (xray) or 'N' (neutron). + + Raises: pdffit2.unassignedError if no phase exists + """ + print(self.get_scat_string(stype), file=output.stdout) + return
+ + +
+[docs] + def get_scat_string(self, stype): + """get_scat_string(stype) --> Get string with scattering factors + of all atoms in the current phase. + + stype -- 'X' (xray) or 'N' (neutron). + + Raises: + pdffit2.unassignedError if no phase exists + + Returns: string with all scattering factors. + """ + return pdffit2.get_scat_string(self._handle, stype.encode())
+ + +
+[docs] + def get_scat(self, stype, element): + """get_scat(stype, element) --> Get active scattering factor for + given element. If scattering factor has been changed using + set_scat the result may depend on the active phase. When no + phase has been loaded, return the standard value. + + stype -- 'X' (xray) or 'N' (neutron). + element -- case-insensitive element symbol such as "Na" or "CL" + + Return float. + + Raises: + ValueError if element is not known. + """ + rv = pdffit2.get_scat(self._handle, stype.encode(), element) + return rv
+ + +
+[docs] + def set_scat(self, stype, element, value): + """set_scat(stype, element, value) --> Set custom scattering + factor for given element. The new scattering factor applies + only for the current phase, in other phases it keeps its default + value. + + stype -- 'X' (xray) or 'N' (neutron). + element -- case-insensitive element symbol such as "Na" or "CL" + value -- new value of scattering factor + + No return value. + + Raises: + pdffit2.unassignedError if no phase exists. + ValueError if element is not known. + + See also reset_scat, get_scat. + """ + pdffit2.set_scat(self._handle, stype.encode(), element, value) + return
+ + +
+[docs] + def reset_scat(self, element): + """reset_scat(stype, element) --> Reset scattering factors for + given element to their standard values. The reset_scat applies + only for the current phase. + + element -- case-insensitive element symbol such as "Na" or "CL" + Raises: + pdffit2.unassignedError if no phase exists + ValueError if element is not known. + """ + pdffit2.reset_scat(self._handle, element) + return
+ + +
+[docs] + def num_atoms(self): + """num_atoms() --> Get number of atoms in current phase. + + Raises: pdffit2.unassignedError if no atoms exist + """ + return pdffit2.num_atoms(self._handle)
+ + +
+[docs] + def num_phases(self): + """num_phases() --> Number of phases loaded in PdfFit instance. + + Use setphase to bring a specific phase in focus. + + Return integer. + """ + n = pdffit2.num_phases(self._handle) + return n
+ + +
+[docs] + def num_datasets(self): + """num_datasets() --> Number of datasets loaded in PdfFit + instance. + + Use setdata to bring a specific dataset in focus. + + Return integer. + """ + n = pdffit2.num_datasets(self._handle) + return n
+ + +
+[docs] + def phase_fractions(self): + """phase_fractions() --> relative phase fractions for current + dataset. Convert phase scale factors to relative phase fractions + given the scattering type of current dataset. + + Return a dictionary of phase fractions with following keys: + + "atom" -- list of fractions normalized to atom count + "stdatom" -- errors of atom count fractions + "cell" -- list of fractions normalized to unit cell count + "stdcell" -- errors of unit cell count fractions + "mass" -- list of relative weight fractions + "stdmass" -- errors of relative weight fractions + + Raises: pdffit2.unassignedError if no dataset exists. + """ + return pdffit2.phase_fractions(self._handle)
+ + + # Begin refinable variables. + +
+[docs] + def lat(n): + """Lat(n) --> Get reference to lattice variable n. + + n can be an integer or a string representing the lattice + variable. 1 <==> 'a' 2 <==> 'b' 3 <==> 'c' 4 <==> 'alpha' 5 <==> + 'beta' 6 <==> 'gamma' + """ + LatParams = {"a": 1, "b": 2, "c": 3, "alpha": 4, "beta": 5, "gamma": 6} + if isinstance(n, str): + n = LatParams[n] + return "lat(%i)" % n
+ + + lat = staticmethod(lat) + +
+[docs] + def x(i): + """X(i) --> Get reference to x-value of atom i.""" + return "x(%i)" % i
+ + + x = staticmethod(x) + +
+[docs] + def y(i): + """Y(i) --> Get reference to y-value of atom i.""" + return "y(%i)" % i
+ + + y = staticmethod(y) + +
+[docs] + def z(i): + """Z(i) --> Get reference to z-value of atom i.""" + return "z(%i)" % i
+ + + z = staticmethod(z) + +
+[docs] + def u11(i): + """U11(i) --> Get reference to U(1,1) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u11(%i)" % i
+ + + u11 = staticmethod(u11) + +
+[docs] + def u22(i): + """U22(i) --> Get reference to U(2,2) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u22(%i)" % i
+ + + u22 = staticmethod(u22) + +
+[docs] + def u33(i): + """U33(i) --> Get reference to U(3,3) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u33(%i)" % i
+ + + u33 = staticmethod(u33) + +
+[docs] + def u12(i): + """U12(i) --> Get reference to U(1,2) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u12(%i)" % i
+ + + u12 = staticmethod(u12) + +
+[docs] + def u13(i): + """U13(i) --> Get reference to U(1,3) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u13(%i)" % i
+ + + u13 = staticmethod(u13) + +
+[docs] + def u23(i): + """U23(i) --> Get reference to U(2,3) for atom i. + + U is the anisotropic thermal factor tensor. + """ + return "u23(%i)" % i
+ + + u23 = staticmethod(u23) + +
+[docs] + def occ(i): + """Occ(i) --> Get reference to occupancy of atom i.""" + return "occ(%i)" % i
+ + + occ = staticmethod(occ) + +
+[docs] + def pscale(): + """Pscale() --> Get reference to pscale. + + pscale is the fraction of the total structure that the current + phase represents. + """ + return "pscale"
+ + + pscale = staticmethod(pscale) + +
+[docs] + def sratio(): + """Sratio() --> Get reference to sigma ratio. + + The sigma ratio determines the reduction in the Debye-Waller + factor for distances below rcut. + """ + return "sratio"
+ + + sratio = staticmethod(sratio) + +
+[docs] + def delta1(): + """Delta1() --> Get reference to 1/R peak sharpening factor.""" + return "delta1"
+ + + delta1 = staticmethod(delta1) + +
+[docs] + def delta2(): + """Delta2() --> Reference to (1/R^2) sharpening factor. + + The phenomenological correlation constant in the Debye-Waller + factor. The (1/R^2) peak sharpening factor. + """ + return "delta2"
+ + + delta2 = staticmethod(delta2) + +
+[docs] + def dscale(): + """Dscale() --> Get reference to dscale. + + The data scale factor. + """ + return "dscale"
+ + + dscale = staticmethod(dscale) + +
+[docs] + def qdamp(): + """Qdamp() --> Get reference to qdamp. + + Qdamp controls PDF damping due to instrument Q-resolution. + """ + return "qdamp"
+ + + qdamp = staticmethod(qdamp) + +
+[docs] + def qbroad(): + """Qbroad() --> Get reference to qbroad. + + Quadratic peak broadening factor. + """ + return "qbroad"
+ + + qbroad = staticmethod(qbroad) + +
+[docs] + def spdiameter(): + """Spdiameter() --> Get reference to spdiameter (phase + property). + + Diameter value for the spherical particle PDF correction. + Spherical envelope is not applied when spdiameter equals 0. + """ + return "spdiameter"
+ + + spdiameter = staticmethod(spdiameter) + +
+[docs] + def stepcut(): + """Stepcut() --> Get reference to stepcut (phase property). + + stepcut is cutoff radius for empirical step-function PDF + envelope. stepcut can be used to approximate loss of pair + correlations in amorphous phase. stepcut cannot be refined. + + Step cutoff is not applied when stepcut equals 0. + """ + return "stepcut"
+ + + stepcut = staticmethod(stepcut) + +
+[docs] + def rcut(): + """Rcut() --> Get reference to rcut. + + rcut is the value of r below which peak sharpening, defined by + the sigma ratio (sratio), applies. rcut cannot be refined. + """ + return "rcut"
+ + + rcut = staticmethod(rcut) + + # End refinable variables. + + def __init__(self, create_intro=True): + """Initialize the Pdffit class, create a new PdfFit object. + + Parameters + ---------- + create_intro : bool, optional + The flag to control the display of an introduction message. + If True, display an introduction message, else not. Default is True. + """ + + self.stru_files = [] + self.data_files = [] + + self._handle = pdffit2.create() + if create_intro: + self.intro() + return + + def __getRef(self, var_string): + """Return the actual reference to the variable in the + var_string. + + This function must be called before trying to actually reference an + internal variable. See the constrain method for an example. + + Raises: + pdffit2.unassignedError if variable is not yet assigned + ValueError if variable index does not exist (e.g. lat(7)) + """ + var_string = _convertCallable(var_string) + arg_int = None + try: + method_string, arg_string = var_string.split("(") + method_string = method_string.strip() + arg_int = int(arg_string.strip(")").strip()) + except ValueError: # There is no arg_string + method_string = var_string.strip() + + f = getattr(pdffit2, method_string) + if arg_int is None: + retval = f(self._handle) + else: + retval = f(self._handle, arg_int) + return retval
+ + + +# End of class PdfFit + + +# End of file +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 00000000..92415cd1 --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,107 @@ + + + + + + + + Overview: module code — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ +

All modules for which code is available

+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/source/api/diffpy.pdffit2.rst b/_sources/api/diffpy.pdffit2.rst.txt similarity index 100% rename from docs/source/api/diffpy.pdffit2.rst rename to _sources/api/diffpy.pdffit2.rst.txt diff --git a/docs/source/examples.rst b/_sources/examples.rst.txt similarity index 100% rename from docs/source/examples.rst rename to _sources/examples.rst.txt diff --git a/docs/source/index.rst b/_sources/index.rst.txt similarity index 100% rename from docs/source/index.rst rename to _sources/index.rst.txt diff --git a/docs/source/license.rst b/_sources/license.rst.txt similarity index 100% rename from docs/source/license.rst rename to _sources/license.rst.txt diff --git a/docs/source/release.rst b/_sources/release.rst.txt similarity index 100% rename from docs/source/release.rst rename to _sources/release.rst.txt diff --git a/_static/_sphinx_javascript_frameworks_compat.js b/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 00000000..81415803 --- /dev/null +++ b/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/_static/base-stemmer.js b/_static/base-stemmer.js new file mode 100644 index 00000000..e6fa0c49 --- /dev/null +++ b/_static/base-stemmer.js @@ -0,0 +1,476 @@ +// @ts-check + +/**@constructor*/ +BaseStemmer = function() { + /** @protected */ + this.current = ''; + this.cursor = 0; + this.limit = 0; + this.limit_backward = 0; + this.bra = 0; + this.ket = 0; + + /** + * @param {string} value + */ + this.setCurrent = function(value) { + this.current = value; + this.cursor = 0; + this.limit = this.current.length; + this.limit_backward = 0; + this.bra = this.cursor; + this.ket = this.limit; + }; + + /** + * @return {string} + */ + this.getCurrent = function() { + return this.current; + }; + + /** + * @param {BaseStemmer} other + */ + this.copy_from = function(other) { + /** @protected */ + this.current = other.current; + this.cursor = other.cursor; + this.limit = other.limit; + this.limit_backward = other.limit_backward; + this.bra = other.bra; + this.ket = other.ket; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.in_grouping = function(s, min, max) { + /** @protected */ + if (this.cursor >= this.limit) return false; + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) return false; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; + this.cursor++; + return true; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_in_grouping = function(s, min, max) { + /** @protected */ + while (this.cursor < this.limit) { + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) + return true; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) + return true; + this.cursor++; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.in_grouping_b = function(s, min, max) { + /** @protected */ + if (this.cursor <= this.limit_backward) return false; + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) return false; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; + this.cursor--; + return true; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_in_grouping_b = function(s, min, max) { + /** @protected */ + while (this.cursor > this.limit_backward) { + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) return true; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return true; + this.cursor--; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.out_grouping = function(s, min, max) { + /** @protected */ + if (this.cursor >= this.limit) return false; + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) { + this.cursor++; + return true; + } + ch -= min; + if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) == 0) { + this.cursor++; + return true; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_out_grouping = function(s, min, max) { + /** @protected */ + while (this.cursor < this.limit) { + var ch = this.current.charCodeAt(this.cursor); + if (ch <= max && ch >= min) { + ch -= min; + if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) != 0) { + return true; + } + } + this.cursor++; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.out_grouping_b = function(s, min, max) { + /** @protected */ + if (this.cursor <= this.limit_backward) return false; + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) { + this.cursor--; + return true; + } + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) { + this.cursor--; + return true; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_out_grouping_b = function(s, min, max) { + /** @protected */ + while (this.cursor > this.limit_backward) { + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch <= max && ch >= min) { + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) != 0) { + return true; + } + } + this.cursor--; + } + return false; + }; + + /** + * @param {string} s + * @return {boolean} + */ + this.eq_s = function(s) + { + /** @protected */ + if (this.limit - this.cursor < s.length) return false; + if (this.current.slice(this.cursor, this.cursor + s.length) != s) + { + return false; + } + this.cursor += s.length; + return true; + }; + + /** + * @param {string} s + * @return {boolean} + */ + this.eq_s_b = function(s) + { + /** @protected */ + if (this.cursor - this.limit_backward < s.length) return false; + if (this.current.slice(this.cursor - s.length, this.cursor) != s) + { + return false; + } + this.cursor -= s.length; + return true; + }; + + /** + * @param {Among[]} v + * @return {number} + */ + this.find_among = function(v) + { + /** @protected */ + var i = 0; + var j = v.length; + + var c = this.cursor; + var l = this.limit; + + var common_i = 0; + var common_j = 0; + + var first_key_inspected = false; + + while (true) + { + var k = i + ((j - i) >>> 1); + var diff = 0; + var common = common_i < common_j ? common_i : common_j; // smaller + // w[0]: string, w[1]: substring_i, w[2]: result, w[3]: function (optional) + var w = v[k]; + var i2; + for (i2 = common; i2 < w[0].length; i2++) + { + if (c + common == l) + { + diff = -1; + break; + } + diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2); + if (diff != 0) break; + common++; + } + if (diff < 0) + { + j = k; + common_j = common; + } + else + { + i = k; + common_i = common; + } + if (j - i <= 1) + { + if (i > 0) break; // v->s has been inspected + if (j == i) break; // only one item in v + + // - but now we need to go round once more to get + // v->s inspected. This looks messy, but is actually + // the optimal approach. + + if (first_key_inspected) break; + first_key_inspected = true; + } + } + do { + var w = v[i]; + if (common_i >= w[0].length) + { + this.cursor = c + w[0].length; + if (w.length < 4) return w[2]; + var res = w[3](this); + this.cursor = c + w[0].length; + if (res) return w[2]; + } + i = w[1]; + } while (i >= 0); + return 0; + }; + + // find_among_b is for backwards processing. Same comments apply + /** + * @param {Among[]} v + * @return {number} + */ + this.find_among_b = function(v) + { + /** @protected */ + var i = 0; + var j = v.length + + var c = this.cursor; + var lb = this.limit_backward; + + var common_i = 0; + var common_j = 0; + + var first_key_inspected = false; + + while (true) + { + var k = i + ((j - i) >> 1); + var diff = 0; + var common = common_i < common_j ? common_i : common_j; + var w = v[k]; + var i2; + for (i2 = w[0].length - 1 - common; i2 >= 0; i2--) + { + if (c - common == lb) + { + diff = -1; + break; + } + diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2); + if (diff != 0) break; + common++; + } + if (diff < 0) + { + j = k; + common_j = common; + } + else + { + i = k; + common_i = common; + } + if (j - i <= 1) + { + if (i > 0) break; + if (j == i) break; + if (first_key_inspected) break; + first_key_inspected = true; + } + } + do { + var w = v[i]; + if (common_i >= w[0].length) + { + this.cursor = c - w[0].length; + if (w.length < 4) return w[2]; + var res = w[3](this); + this.cursor = c - w[0].length; + if (res) return w[2]; + } + i = w[1]; + } while (i >= 0); + return 0; + }; + + /* to replace chars between c_bra and c_ket in this.current by the + * chars in s. + */ + /** + * @param {number} c_bra + * @param {number} c_ket + * @param {string} s + * @return {number} + */ + this.replace_s = function(c_bra, c_ket, s) + { + /** @protected */ + var adjustment = s.length - (c_ket - c_bra); + this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); + this.limit += adjustment; + if (this.cursor >= c_ket) this.cursor += adjustment; + else if (this.cursor > c_bra) this.cursor = c_bra; + return adjustment; + }; + + /** + * @return {boolean} + */ + this.slice_check = function() + { + /** @protected */ + if (this.bra < 0 || + this.bra > this.ket || + this.ket > this.limit || + this.limit > this.current.length) + { + return false; + } + return true; + }; + + /** + * @param {number} c_bra + * @return {boolean} + */ + this.slice_from = function(s) + { + /** @protected */ + var result = false; + if (this.slice_check()) + { + this.replace_s(this.bra, this.ket, s); + result = true; + } + return result; + }; + + /** + * @return {boolean} + */ + this.slice_del = function() + { + /** @protected */ + return this.slice_from(""); + }; + + /** + * @param {number} c_bra + * @param {number} c_ket + * @param {string} s + */ + this.insert = function(c_bra, c_ket, s) + { + /** @protected */ + var adjustment = this.replace_s(c_bra, c_ket, s); + if (c_bra <= this.bra) this.bra += adjustment; + if (c_bra <= this.ket) this.ket += adjustment; + }; + + /** + * @return {string} + */ + this.slice_to = function() + { + /** @protected */ + var result = ''; + if (this.slice_check()) + { + result = this.current.slice(this.bra, this.ket); + } + return result; + }; + + /** + * @return {string} + */ + this.assign_to = function() + { + /** @protected */ + return this.current.slice(0, this.limit); + }; +}; diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 00000000..4738b2ed --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,906 @@ +/* + * Sphinx stylesheet -- basic theme. + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin-top: 10px; +} + +ul.search li { + padding: 5px 0; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/check-solid.svg b/_static/check-solid.svg new file mode 100644 index 00000000..92fad4b5 --- /dev/null +++ b/_static/check-solid.svg @@ -0,0 +1,4 @@ + + + + diff --git a/_static/clipboard.min.js b/_static/clipboard.min.js new file mode 100644 index 00000000..54b3c463 --- /dev/null +++ b/_static/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.8 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 + + + + diff --git a/_static/copybutton.css b/_static/copybutton.css new file mode 100644 index 00000000..f1916ec7 --- /dev/null +++ b/_static/copybutton.css @@ -0,0 +1,94 @@ +/* Copy buttons */ +button.copybtn { + position: absolute; + display: flex; + top: .3em; + right: .3em; + width: 1.7em; + height: 1.7em; + opacity: 0; + transition: opacity 0.3s, border .3s, background-color .3s; + user-select: none; + padding: 0; + border: none; + outline: none; + border-radius: 0.4em; + /* The colors that GitHub uses */ + border: #1b1f2426 1px solid; + background-color: #f6f8fa; + color: #57606a; +} + +button.copybtn.success { + border-color: #22863a; + color: #22863a; +} + +button.copybtn svg { + stroke: currentColor; + width: 1.5em; + height: 1.5em; + padding: 0.1em; +} + +div.highlight { + position: relative; +} + +/* Show the copybutton */ +.highlight:hover button.copybtn, button.copybtn.success { + opacity: 1; +} + +.highlight button.copybtn:hover { + background-color: rgb(235, 235, 235); +} + +.highlight button.copybtn:active { + background-color: rgb(187, 187, 187); +} + +/** + * A minimal CSS-only tooltip copied from: + * https://codepen.io/mildrenben/pen/rVBrpK + * + * To use, write HTML like the following: + * + *

Short

+ */ + .o-tooltip--left { + position: relative; + } + + .o-tooltip--left:after { + opacity: 0; + visibility: hidden; + position: absolute; + content: attr(data-tooltip); + padding: .2em; + font-size: .8em; + left: -.2em; + background: grey; + color: white; + white-space: nowrap; + z-index: 2; + border-radius: 2px; + transform: translateX(-102%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); +} + +.o-tooltip--left:hover:after { + display: block; + opacity: 1; + visibility: visible; + transform: translateX(-100%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); + transition-delay: .5s; +} + +/* By default the copy button shouldn't show up when printing a page */ +@media print { + button.copybtn { + display: none; + } +} diff --git a/_static/copybutton.js b/_static/copybutton.js new file mode 100644 index 00000000..caa31c1e --- /dev/null +++ b/_static/copybutton.js @@ -0,0 +1,248 @@ +// Localization support +const messages = { + 'en': { + 'copy': 'Copy', + 'copy_to_clipboard': 'Copy to clipboard', + 'copy_success': 'Copied!', + 'copy_failure': 'Failed to copy', + }, + 'es' : { + 'copy': 'Copiar', + 'copy_to_clipboard': 'Copiar al portapapeles', + 'copy_success': '¡Copiado!', + 'copy_failure': 'Error al copiar', + }, + 'de' : { + 'copy': 'Kopieren', + 'copy_to_clipboard': 'In die Zwischenablage kopieren', + 'copy_success': 'Kopiert!', + 'copy_failure': 'Fehler beim Kopieren', + }, + 'fr' : { + 'copy': 'Copier', + 'copy_to_clipboard': 'Copier dans le presse-papier', + 'copy_success': 'Copié !', + 'copy_failure': 'Échec de la copie', + }, + 'ru': { + 'copy': 'Скопировать', + 'copy_to_clipboard': 'Скопировать в буфер', + 'copy_success': 'Скопировано!', + 'copy_failure': 'Не удалось скопировать', + }, + 'zh-CN': { + 'copy': '复制', + 'copy_to_clipboard': '复制到剪贴板', + 'copy_success': '复制成功!', + 'copy_failure': '复制失败', + }, + 'it' : { + 'copy': 'Copiare', + 'copy_to_clipboard': 'Copiato negli appunti', + 'copy_success': 'Copiato!', + 'copy_failure': 'Errore durante la copia', + } +} + +let locale = 'en' +if( document.documentElement.lang !== undefined + && messages[document.documentElement.lang] !== undefined ) { + locale = document.documentElement.lang +} + +let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT; +if (doc_url_root == '#') { + doc_url_root = ''; +} + +/** + * SVG files for our copy buttons + */ +let iconCheck = ` + ${messages[locale]['copy_success']} + + +` + +// If the user specified their own SVG use that, otherwise use the default +let iconCopy = ``; +if (!iconCopy) { + iconCopy = ` + ${messages[locale]['copy_to_clipboard']} + + + +` +} + +/** + * Set up copy/paste for code blocks + */ + +const runWhenDOMLoaded = cb => { + if (document.readyState != 'loading') { + cb() + } else if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', cb) + } else { + document.attachEvent('onreadystatechange', function() { + if (document.readyState == 'complete') cb() + }) + } +} + +const codeCellId = index => `codecell${index}` + +// Clears selected text since ClipboardJS will select the text when copying +const clearSelection = () => { + if (window.getSelection) { + window.getSelection().removeAllRanges() + } else if (document.selection) { + document.selection.empty() + } +} + +// Changes tooltip text for a moment, then changes it back +// We want the timeout of our `success` class to be a bit shorter than the +// tooltip and icon change, so that we can hide the icon before changing back. +var timeoutIcon = 2000; +var timeoutSuccessClass = 1500; + +const temporarilyChangeTooltip = (el, oldText, newText) => { + el.setAttribute('data-tooltip', newText) + el.classList.add('success') + // Remove success a little bit sooner than we change the tooltip + // So that we can use CSS to hide the copybutton first + setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) + setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) +} + +// Changes the copy button icon for two seconds, then changes it back +const temporarilyChangeIcon = (el) => { + el.innerHTML = iconCheck; + setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) +} + +const addCopyButtonToCodeCells = () => { + // If ClipboardJS hasn't loaded, wait a bit and try again. This + // happens because we load ClipboardJS asynchronously. + if (window.ClipboardJS === undefined) { + setTimeout(addCopyButtonToCodeCells, 250) + return + } + + // Add copybuttons to all of our code cells + const COPYBUTTON_SELECTOR = 'div.highlight pre'; + const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) + codeCells.forEach((codeCell, index) => { + const id = codeCellId(index) + codeCell.setAttribute('id', id) + + const clipboardButton = id => + `` + codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) + }) + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} + + +var copyTargetText = (trigger) => { + var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); + + // get filtered text + let exclude = '.linenos'; + + let text = filterText(target, exclude); + return formatCopyText(text, '^\\$ ', true, true, true, true, '', '') +} + + // Initialize with a callback so we can modify the text before copy + const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) + + // Update UI with error/success messages + clipboard.on('success', event => { + clearSelection() + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) + temporarilyChangeIcon(event.trigger) + }) + + clipboard.on('error', event => { + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) + }) +} + +runWhenDOMLoaded(addCopyButtonToCodeCells) \ No newline at end of file diff --git a/_static/copybutton_funcs.js b/_static/copybutton_funcs.js new file mode 100644 index 00000000..dbe1aaad --- /dev/null +++ b/_static/copybutton_funcs.js @@ -0,0 +1,73 @@ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +export function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} diff --git a/_static/css/badge_only.css b/_static/css/badge_only.css new file mode 100644 index 00000000..88ba55b9 --- /dev/null +++ b/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px} \ No newline at end of file diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff b/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 00000000..6cb60000 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff2 b/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 00000000..7059e231 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff b/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 00000000..f815f63f Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff2 b/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 00000000..f2c76e5b Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/_static/css/fonts/fontawesome-webfont.eot b/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..e9f60ca9 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/_static/css/fonts/fontawesome-webfont.svg b/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/css/fonts/fontawesome-webfont.ttf b/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/_static/css/fonts/fontawesome-webfont.woff b/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/_static/css/fonts/fontawesome-webfont.woff2 b/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/css/fonts/lato-bold-italic.woff b/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff differ diff --git a/_static/css/fonts/lato-bold-italic.woff2 b/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/_static/css/fonts/lato-bold.woff b/_static/css/fonts/lato-bold.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/_static/css/fonts/lato-bold.woff differ diff --git a/_static/css/fonts/lato-bold.woff2 b/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff2 differ diff --git a/_static/css/fonts/lato-normal-italic.woff b/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff differ diff --git a/_static/css/fonts/lato-normal-italic.woff2 b/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 00000000..3404f37e Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/_static/css/fonts/lato-normal.woff b/_static/css/fonts/lato-normal.woff new file mode 100644 index 00000000..ae1307ff Binary files /dev/null and b/_static/css/fonts/lato-normal.woff differ diff --git a/_static/css/fonts/lato-normal.woff2 b/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff2 differ diff --git a/_static/css/theme.css b/_static/css/theme.css new file mode 100644 index 00000000..a88467c1 --- /dev/null +++ b/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search .wy-dropdown>aactive,.wy-side-nav-search .wy-dropdown>afocus,.wy-side-nav-search>a:hover,.wy-side-nav-search>aactive,.wy-side-nav-search>afocus{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon,.wy-side-nav-search>a.icon{display:block}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.switch-menus{position:relative;display:block;margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-side-nav-search>div.switch-menus>div.language-switch,.wy-side-nav-search>div.switch-menus>div.version-switch{display:inline-block;padding:.2em}.wy-side-nav-search>div.switch-menus>div.language-switch select,.wy-side-nav-search>div.switch-menus>div.version-switch select{display:inline-block;margin-right:-2rem;padding-right:2rem;max-width:240px;text-align-last:center;background:none;border:none;border-radius:0;box-shadow:none;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-size:1em;font-weight:400;color:hsla(0,0%,100%,.3);cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none}.wy-side-nav-search>div.switch-menus>div.language-switch select:active,.wy-side-nav-search>div.switch-menus>div.language-switch select:focus,.wy-side-nav-search>div.switch-menus>div.language-switch select:hover,.wy-side-nav-search>div.switch-menus>div.version-switch select:active,.wy-side-nav-search>div.switch-menus>div.version-switch select:focus,.wy-side-nav-search>div.switch-menus>div.version-switch select:hover{background:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.5)}.wy-side-nav-search>div.switch-menus>div.language-switch select option,.wy-side-nav-search>div.switch-menus>div.version-switch select option{color:#000}.wy-side-nav-search>div.switch-menus>div.language-switch:has(>select):after,.wy-side-nav-search>div.switch-menus>div.version-switch:has(>select):after{display:inline-block;width:1.5em;height:100%;padding:.1em;content:"\f0d7";font-size:1em;line-height:1.2em;font-family:FontAwesome;text-align:center;pointer-events:none;box-sizing:border-box}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%;float:none;margin-left:0}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 00000000..807cdb17 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,150 @@ +/* + * Base JavaScript utilities for all Sphinx HTML documentation. + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})`, + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)), + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS + && !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) + return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 00000000..e55dc945 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '1.6.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: true, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/english-stemmer.js b/_static/english-stemmer.js new file mode 100644 index 00000000..056760ee --- /dev/null +++ b/_static/english-stemmer.js @@ -0,0 +1,1066 @@ +// Generated from english.sbl by Snowball 3.0.1 - https://snowballstem.org/ + +/**@constructor*/ +var EnglishStemmer = function() { + var base = new BaseStemmer(); + + /** @const */ var a_0 = [ + ["arsen", -1, -1], + ["commun", -1, -1], + ["emerg", -1, -1], + ["gener", -1, -1], + ["later", -1, -1], + ["organ", -1, -1], + ["past", -1, -1], + ["univers", -1, -1] + ]; + + /** @const */ var a_1 = [ + ["'", -1, 1], + ["'s'", 0, 1], + ["'s", -1, 1] + ]; + + /** @const */ var a_2 = [ + ["ied", -1, 2], + ["s", -1, 3], + ["ies", 1, 2], + ["sses", 1, 1], + ["ss", 1, -1], + ["us", 1, -1] + ]; + + /** @const */ var a_3 = [ + ["succ", -1, 1], + ["proc", -1, 1], + ["exc", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["even", -1, 2], + ["cann", -1, 2], + ["inn", -1, 2], + ["earr", -1, 2], + ["herr", -1, 2], + ["out", -1, 2], + ["y", -1, 1] + ]; + + /** @const */ var a_5 = [ + ["", -1, -1], + ["ed", 0, 2], + ["eed", 1, 1], + ["ing", 0, 3], + ["edly", 0, 2], + ["eedly", 4, 1], + ["ingly", 0, 2] + ]; + + /** @const */ var a_6 = [ + ["", -1, 3], + ["bb", 0, 2], + ["dd", 0, 2], + ["ff", 0, 2], + ["gg", 0, 2], + ["bl", 0, 1], + ["mm", 0, 2], + ["nn", 0, 2], + ["pp", 0, 2], + ["rr", 0, 2], + ["at", 0, 1], + ["tt", 0, 2], + ["iz", 0, 1] + ]; + + /** @const */ var a_7 = [ + ["anci", -1, 3], + ["enci", -1, 2], + ["ogi", -1, 14], + ["li", -1, 16], + ["bli", 3, 12], + ["abli", 4, 4], + ["alli", 3, 8], + ["fulli", 3, 9], + ["lessli", 3, 15], + ["ousli", 3, 10], + ["entli", 3, 5], + ["aliti", -1, 8], + ["biliti", -1, 12], + ["iviti", -1, 11], + ["tional", -1, 1], + ["ational", 14, 7], + ["alism", -1, 8], + ["ation", -1, 7], + ["ization", 17, 6], + ["izer", -1, 6], + ["ator", -1, 7], + ["iveness", -1, 11], + ["fulness", -1, 9], + ["ousness", -1, 10], + ["ogist", -1, 13] + ]; + + /** @const */ var a_8 = [ + ["icate", -1, 4], + ["ative", -1, 6], + ["alize", -1, 3], + ["iciti", -1, 4], + ["ical", -1, 4], + ["tional", -1, 1], + ["ational", 5, 2], + ["ful", -1, 5], + ["ness", -1, 5] + ]; + + /** @const */ var a_9 = [ + ["ic", -1, 1], + ["ance", -1, 1], + ["ence", -1, 1], + ["able", -1, 1], + ["ible", -1, 1], + ["ate", -1, 1], + ["ive", -1, 1], + ["ize", -1, 1], + ["iti", -1, 1], + ["al", -1, 1], + ["ism", -1, 1], + ["ion", -1, 2], + ["er", -1, 1], + ["ous", -1, 1], + ["ant", -1, 1], + ["ent", -1, 1], + ["ment", 15, 1], + ["ement", 16, 1] + ]; + + /** @const */ var a_10 = [ + ["e", -1, 1], + ["l", -1, 2] + ]; + + /** @const */ var a_11 = [ + ["andes", -1, -1], + ["atlas", -1, -1], + ["bias", -1, -1], + ["cosmos", -1, -1], + ["early", -1, 5], + ["gently", -1, 3], + ["howe", -1, -1], + ["idly", -1, 2], + ["news", -1, -1], + ["only", -1, 6], + ["singly", -1, 7], + ["skies", -1, 1], + ["sky", -1, -1], + ["ugly", -1, 4] + ]; + + /** @const */ var /** Array */ g_aeo = [17, 64]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1]; + + /** @const */ var /** Array */ g_v_WXY = [1, 17, 65, 208, 1]; + + /** @const */ var /** Array */ g_valid_LI = [55, 141, 2]; + + var /** boolean */ B_Y_found = false; + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_prelude() { + B_Y_found = false; + /** @const */ var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + if (!(base.eq_s("'"))) + { + break lab0; + } + base.ket = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + base.cursor = v_1; + /** @const */ var /** number */ v_2 = base.cursor; + lab1: { + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab1; + } + base.ket = base.cursor; + if (!base.slice_from("Y")) + { + return false; + } + B_Y_found = true; + } + base.cursor = v_2; + /** @const */ var /** number */ v_3 = base.cursor; + lab2: { + while(true) + { + /** @const */ var /** number */ v_4 = base.cursor; + lab3: { + golab4: while(true) + { + /** @const */ var /** number */ v_5 = base.cursor; + lab5: { + if (!(base.in_grouping(g_v, 97, 121))) + { + break lab5; + } + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab5; + } + base.ket = base.cursor; + base.cursor = v_5; + break golab4; + } + base.cursor = v_5; + if (base.cursor >= base.limit) + { + break lab3; + } + base.cursor++; + } + if (!base.slice_from("Y")) + { + return false; + } + B_Y_found = true; + continue; + } + base.cursor = v_4; + break; + } + } + base.cursor = v_3; + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + I_p2 = base.limit; + /** @const */ var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + /** @const */ var /** number */ v_2 = base.cursor; + lab2: { + if (base.find_among(a_0) == 0) + { + break lab2; + } + break lab1; + } + base.cursor = v_2; + if (!base.go_out_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + if (!base.go_in_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + } + I_p1 = base.cursor; + if (!base.go_out_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + if (!base.go_in_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + I_p2 = base.cursor; + } + base.cursor = v_1; + return true; + }; + + /** @return {boolean} */ + function r_shortv() { + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.out_grouping_b(g_v_WXY, 89, 121))) + { + break lab1; + } + if (!(base.in_grouping_b(g_v, 97, 121))) + { + break lab1; + } + if (!(base.out_grouping_b(g_v, 97, 121))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + lab2: { + if (!(base.out_grouping_b(g_v, 97, 121))) + { + break lab2; + } + if (!(base.in_grouping_b(g_v, 97, 121))) + { + break lab2; + } + if (base.cursor > base.limit_backward) + { + break lab2; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("past"))) + { + return false; + } + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + return I_p1 <= base.cursor; + }; + + /** @return {boolean} */ + function r_R2() { + return I_p2 <= base.cursor; + }; + + /** @return {boolean} */ + function r_Step_1a() { + var /** number */ among_var; + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (base.find_among_b(a_1) == 0) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("ss")) + { + return false; + } + break; + case 2: + lab1: { + /** @const */ var /** number */ v_2 = base.limit - base.cursor; + lab2: { + { + /** @const */ var /** number */ c1 = base.cursor - 2; + if (c1 < base.limit_backward) + { + break lab2; + } + base.cursor = c1; + } + if (!base.slice_from("i")) + { + return false; + } + break lab1; + } + base.cursor = base.limit - v_2; + if (!base.slice_from("ie")) + { + return false; + } + } + break; + case 3: + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + if (!base.go_out_grouping_b(g_v, 97, 121)) + { + return false; + } + base.cursor--; + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1b() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_5); + base.bra = base.cursor; + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + switch (among_var) { + case 1: + /** @const */ var /** number */ v_2 = base.limit - base.cursor; + lab2: { + lab3: { + /** @const */ var /** number */ v_3 = base.limit - base.cursor; + lab4: { + if (base.find_among_b(a_3) == 0) + { + break lab4; + } + if (base.cursor > base.limit_backward) + { + break lab4; + } + break lab3; + } + base.cursor = base.limit - v_3; + if (!r_R1()) + { + break lab2; + } + if (!base.slice_from("ee")) + { + return false; + } + } + } + base.cursor = base.limit - v_2; + break; + case 2: + break lab1; + case 3: + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + break lab1; + } + switch (among_var) { + case 1: + /** @const */ var /** number */ v_4 = base.limit - base.cursor; + if (!(base.out_grouping_b(g_v, 97, 121))) + { + break lab1; + } + if (base.cursor > base.limit_backward) + { + break lab1; + } + base.cursor = base.limit - v_4; + base.bra = base.cursor; + if (!base.slice_from("ie")) + { + return false; + } + break; + case 2: + if (base.cursor > base.limit_backward) + { + break lab1; + } + break; + } + break; + } + break lab0; + } + base.cursor = base.limit - v_1; + /** @const */ var /** number */ v_5 = base.limit - base.cursor; + if (!base.go_out_grouping_b(g_v, 97, 121)) + { + return false; + } + base.cursor--; + base.cursor = base.limit - v_5; + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + base.bra = base.cursor; + /** @const */ var /** number */ v_6 = base.limit - base.cursor; + among_var = base.find_among_b(a_6); + switch (among_var) { + case 1: + if (!base.slice_from("e")) + { + return false; + } + return false; + case 2: + { + /** @const */ var /** number */ v_7 = base.limit - base.cursor; + lab5: { + if (!(base.in_grouping_b(g_aeo, 97, 111))) + { + break lab5; + } + if (base.cursor > base.limit_backward) + { + break lab5; + } + return false; + } + base.cursor = base.limit - v_7; + } + break; + case 3: + if (base.cursor != I_p1) + { + return false; + } + /** @const */ var /** number */ v_8 = base.limit - base.cursor; + if (!r_shortv()) + { + return false; + } + base.cursor = base.limit - v_8; + if (!base.slice_from("e")) + { + return false; + } + return false; + } + base.cursor = base.limit - v_6; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1c() { + base.ket = base.cursor; + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("y"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("Y"))) + { + return false; + } + } + base.bra = base.cursor; + if (!(base.out_grouping_b(g_v, 97, 121))) + { + return false; + } + lab2: { + if (base.cursor > base.limit_backward) + { + break lab2; + } + return false; + } + if (!base.slice_from("i")) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_2() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_7); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("tion")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ence")) + { + return false; + } + break; + case 3: + if (!base.slice_from("ance")) + { + return false; + } + break; + case 4: + if (!base.slice_from("able")) + { + return false; + } + break; + case 5: + if (!base.slice_from("ent")) + { + return false; + } + break; + case 6: + if (!base.slice_from("ize")) + { + return false; + } + break; + case 7: + if (!base.slice_from("ate")) + { + return false; + } + break; + case 8: + if (!base.slice_from("al")) + { + return false; + } + break; + case 9: + if (!base.slice_from("ful")) + { + return false; + } + break; + case 10: + if (!base.slice_from("ous")) + { + return false; + } + break; + case 11: + if (!base.slice_from("ive")) + { + return false; + } + break; + case 12: + if (!base.slice_from("ble")) + { + return false; + } + break; + case 13: + if (!base.slice_from("og")) + { + return false; + } + break; + case 14: + if (!(base.eq_s_b("l"))) + { + return false; + } + if (!base.slice_from("og")) + { + return false; + } + break; + case 15: + if (!base.slice_from("less")) + { + return false; + } + break; + case 16: + if (!(base.in_grouping_b(g_valid_LI, 99, 116))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_3() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_8); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("tion")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ate")) + { + return false; + } + break; + case 3: + if (!base.slice_from("al")) + { + return false; + } + break; + case 4: + if (!base.slice_from("ic")) + { + return false; + } + break; + case 5: + if (!base.slice_del()) + { + return false; + } + break; + case 6: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_4() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_9); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R2()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("s"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("t"))) + { + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_5() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_10); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab0: { + lab1: { + if (!r_R2()) + { + break lab1; + } + break lab0; + } + if (!r_R1()) + { + return false; + } + { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab2: { + if (!r_shortv()) + { + break lab2; + } + return false; + } + base.cursor = base.limit - v_1; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + if (!(base.eq_s_b("l"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_exception1() { + var /** number */ among_var; + base.bra = base.cursor; + among_var = base.find_among(a_11); + if (among_var == 0) + { + return false; + } + base.ket = base.cursor; + if (base.cursor < base.limit) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("sky")) + { + return false; + } + break; + case 2: + if (!base.slice_from("idl")) + { + return false; + } + break; + case 3: + if (!base.slice_from("gentl")) + { + return false; + } + break; + case 4: + if (!base.slice_from("ugli")) + { + return false; + } + break; + case 5: + if (!base.slice_from("earli")) + { + return false; + } + break; + case 6: + if (!base.slice_from("onli")) + { + return false; + } + break; + case 7: + if (!base.slice_from("singl")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + if (!B_Y_found) + { + return false; + } + while(true) + { + /** @const */ var /** number */ v_1 = base.cursor; + lab0: { + golab1: while(true) + { + /** @const */ var /** number */ v_2 = base.cursor; + lab2: { + base.bra = base.cursor; + if (!(base.eq_s("Y"))) + { + break lab2; + } + base.ket = base.cursor; + base.cursor = v_2; + break golab1; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + if (!base.slice_from("y")) + { + return false; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + lab0: { + /** @const */ var /** number */ v_1 = base.cursor; + lab1: { + if (!r_exception1()) + { + break lab1; + } + break lab0; + } + base.cursor = v_1; + lab2: { + { + /** @const */ var /** number */ v_2 = base.cursor; + lab3: { + { + /** @const */ var /** number */ c1 = base.cursor + 3; + if (c1 > base.limit) + { + break lab3; + } + base.cursor = c1; + } + break lab2; + } + base.cursor = v_2; + } + break lab0; + } + base.cursor = v_1; + r_prelude(); + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + /** @const */ var /** number */ v_3 = base.limit - base.cursor; + r_Step_1a(); + base.cursor = base.limit - v_3; + /** @const */ var /** number */ v_4 = base.limit - base.cursor; + r_Step_1b(); + base.cursor = base.limit - v_4; + /** @const */ var /** number */ v_5 = base.limit - base.cursor; + r_Step_1c(); + base.cursor = base.limit - v_5; + /** @const */ var /** number */ v_6 = base.limit - base.cursor; + r_Step_2(); + base.cursor = base.limit - v_6; + /** @const */ var /** number */ v_7 = base.limit - base.cursor; + r_Step_3(); + base.cursor = base.limit - v_7; + /** @const */ var /** number */ v_8 = base.limit - base.cursor; + r_Step_4(); + base.cursor = base.limit - v_8; + /** @const */ var /** number */ v_9 = base.limit - base.cursor; + r_Step_5(); + base.cursor = base.limit - v_9; + base.cursor = base.limit_backward; + /** @const */ var /** number */ v_10 = base.cursor; + r_postlude(); + base.cursor = v_10; + } + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; +}; diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 00000000..a858a410 Binary files /dev/null and b/_static/file.png differ diff --git a/_static/fonts/Lato/lato-bold.eot b/_static/fonts/Lato/lato-bold.eot new file mode 100644 index 00000000..3361183a Binary files /dev/null and b/_static/fonts/Lato/lato-bold.eot differ diff --git a/_static/fonts/Lato/lato-bold.ttf b/_static/fonts/Lato/lato-bold.ttf new file mode 100644 index 00000000..29f691d5 Binary files /dev/null and b/_static/fonts/Lato/lato-bold.ttf differ diff --git a/_static/fonts/Lato/lato-bold.woff b/_static/fonts/Lato/lato-bold.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/_static/fonts/Lato/lato-bold.woff differ diff --git a/_static/fonts/Lato/lato-bold.woff2 b/_static/fonts/Lato/lato-bold.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/_static/fonts/Lato/lato-bold.woff2 differ diff --git a/_static/fonts/Lato/lato-bolditalic.eot b/_static/fonts/Lato/lato-bolditalic.eot new file mode 100644 index 00000000..3d415493 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.eot differ diff --git a/_static/fonts/Lato/lato-bolditalic.ttf b/_static/fonts/Lato/lato-bolditalic.ttf new file mode 100644 index 00000000..f402040b Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.ttf differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff b/_static/fonts/Lato/lato-bolditalic.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.woff differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff2 b/_static/fonts/Lato/lato-bolditalic.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.woff2 differ diff --git a/_static/fonts/Lato/lato-italic.eot b/_static/fonts/Lato/lato-italic.eot new file mode 100644 index 00000000..3f826421 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.eot differ diff --git a/_static/fonts/Lato/lato-italic.ttf b/_static/fonts/Lato/lato-italic.ttf new file mode 100644 index 00000000..b4bfc9b2 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.ttf differ diff --git a/_static/fonts/Lato/lato-italic.woff b/_static/fonts/Lato/lato-italic.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.woff differ diff --git a/_static/fonts/Lato/lato-italic.woff2 b/_static/fonts/Lato/lato-italic.woff2 new file mode 100644 index 00000000..3404f37e Binary files /dev/null and b/_static/fonts/Lato/lato-italic.woff2 differ diff --git a/_static/fonts/Lato/lato-regular.eot b/_static/fonts/Lato/lato-regular.eot new file mode 100644 index 00000000..11e3f2a5 Binary files /dev/null and b/_static/fonts/Lato/lato-regular.eot differ diff --git a/_static/fonts/Lato/lato-regular.ttf b/_static/fonts/Lato/lato-regular.ttf new file mode 100644 index 00000000..74decd9e Binary files /dev/null and b/_static/fonts/Lato/lato-regular.ttf differ diff --git a/_static/fonts/Lato/lato-regular.woff b/_static/fonts/Lato/lato-regular.woff new file mode 100644 index 00000000..ae1307ff Binary files /dev/null and b/_static/fonts/Lato/lato-regular.woff differ diff --git a/_static/fonts/Lato/lato-regular.woff2 b/_static/fonts/Lato/lato-regular.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/_static/fonts/Lato/lato-regular.woff2 differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot new file mode 100644 index 00000000..79dc8efe Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf new file mode 100644 index 00000000..df5d1df2 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff new file mode 100644 index 00000000..6cb60000 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 new file mode 100644 index 00000000..7059e231 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot new file mode 100644 index 00000000..2f7ca78a Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf new file mode 100644 index 00000000..eb52a790 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff new file mode 100644 index 00000000..f815f63f Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 new file mode 100644 index 00000000..f2c76e5b Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 differ diff --git a/_static/jquery.js b/_static/jquery.js new file mode 100644 index 00000000..c4c6022f --- /dev/null +++ b/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t a.language.name.localeCompare(b.language.name)); + + const languagesHTML = ` +
+
Languages
+ ${languages + .map( + (translation) => ` +
+ ${translation.language.code} +
+ `, + ) + .join("\n")} +
+ `; + return languagesHTML; + } + + function renderVersions(config) { + if (!config.versions.active.length) { + return ""; + } + const versionsHTML = ` +
+
Versions
+ ${config.versions.active + .map( + (version) => ` +
+ ${version.slug} +
+ `, + ) + .join("\n")} +
+ `; + return versionsHTML; + } + + function renderDownloads(config) { + if (!Object.keys(config.versions.current.downloads).length) { + return ""; + } + const downloadsNameDisplay = { + pdf: "PDF", + epub: "Epub", + htmlzip: "HTML", + }; + + const downloadsHTML = ` +
+
Downloads
+ ${Object.entries(config.versions.current.downloads) + .map( + ([name, url]) => ` +
+ ${downloadsNameDisplay[name]} +
+ `, + ) + .join("\n")} +
+ `; + return downloadsHTML; + } + + document.addEventListener("readthedocs-addons-data-ready", function (event) { + const config = event.detail.data(); + + const flyout = ` +
+ + Read the Docs + v: ${config.versions.current.slug} + + +
+
+ ${renderLanguages(config)} + ${renderVersions(config)} + ${renderDownloads(config)} +
+
On Read the Docs
+
+ Project Home +
+
+ Builds +
+
+ Downloads +
+
+
+
Search
+
+
+ +
+
+
+
+ + Hosted by Read the Docs + +
+
+ `; + + // Inject the generated flyout into the body HTML element. + document.body.insertAdjacentHTML("beforeend", flyout); + + // Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout. + document + .querySelector("#flyout-search-form") + .addEventListener("focusin", () => { + const event = new CustomEvent("readthedocs-search-show"); + document.dispatchEvent(event); + }); + }) +} + +if (themeLanguageSelector || themeVersionSelector) { + function onSelectorSwitch(event) { + const option = event.target.selectedIndex; + const item = event.target.options[option]; + window.location.href = item.dataset.url; + } + + document.addEventListener("readthedocs-addons-data-ready", function (event) { + const config = event.detail.data(); + + const versionSwitch = document.querySelector( + "div.switch-menus > div.version-switch", + ); + if (themeVersionSelector) { + let versions = config.versions.active; + if (config.versions.current.hidden || config.versions.current.type === "external") { + versions.unshift(config.versions.current); + } + const versionSelect = ` + + `; + + versionSwitch.innerHTML = versionSelect; + versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch); + } + + const languageSwitch = document.querySelector( + "div.switch-menus > div.language-switch", + ); + + if (themeLanguageSelector) { + if (config.projects.translations.length) { + // Add the current language to the options on the selector + let languages = config.projects.translations.concat( + config.projects.current, + ); + languages = languages.sort((a, b) => + a.language.name.localeCompare(b.language.name), + ); + + const languageSelect = ` + + `; + + languageSwitch.innerHTML = languageSelect; + languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch); + } + else { + languageSwitch.remove(); + } + } + }); +} + +document.addEventListener("readthedocs-addons-data-ready", function (event) { + // Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav. + document + .querySelector("[role='search'] input") + .addEventListener("focusin", () => { + const event = new CustomEvent("readthedocs-search-show"); + document.dispatchEvent(event); + }); +}); \ No newline at end of file diff --git a/_static/language_data.js b/_static/language_data.js new file mode 100644 index 00000000..57767864 --- /dev/null +++ b/_static/language_data.js @@ -0,0 +1,13 @@ +/* + * This script contains the language-specific data used by searchtools.js, + * namely the set of stopwords, stemmer, scorer and splitter. + */ + +const stopwords = new Set(["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", "let's", "me", "more", "most", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "ours", "ourselves", "out", "over", "own", "same", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "to", "too", "under", "until", "up", "very", "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "who's", "whom", "why", "why's", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves"]); +window.stopwords = stopwords; // Export to global scope + + +/* Non-minified versions are copied as separate JavaScript files, if available */ +BaseStemmer=function(){this.current="",this.cursor=0,this.limit=0,this.limit_backward=0,this.bra=0,this.ket=0,this.setCurrent=function(t){this.current=t,this.cursor=0,this.limit=this.current.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},this.getCurrent=function(){return this.current},this.copy_from=function(t){this.current=t.current,this.cursor=t.cursor,this.limit=t.limit,this.limit_backward=t.limit_backward,this.bra=t.bra,this.ket=t.ket},this.in_grouping=function(t,r,i){return!(this.cursor>=this.limit||i<(i=this.current.charCodeAt(this.cursor))||i>>3]&1<<(7&i))||(this.cursor++,0))},this.go_in_grouping=function(t,r,i){for(;this.cursor>>3]&1<<(7&s)))return!0;this.cursor++}return!1},this.in_grouping_b=function(t,r,i){return!(this.cursor<=this.limit_backward||i<(i=this.current.charCodeAt(this.cursor-1))||i>>3]&1<<(7&i))||(this.cursor--,0))},this.go_in_grouping_b=function(t,r,i){for(;this.cursor>this.limit_backward;){var s=this.current.charCodeAt(this.cursor-1);if(i>>3]&1<<(7&s)))return!0;this.cursor--}return!1},this.out_grouping=function(t,r,i){return!(this.cursor>=this.limit)&&(i<(i=this.current.charCodeAt(this.cursor))||i>>3]&1<<(7&i)))&&(this.cursor++,!0)},this.go_out_grouping=function(t,r,i){for(;this.cursor>>3]&1<<(7&s)))return!0;this.cursor++}return!1},this.out_grouping_b=function(t,r,i){return!(this.cursor<=this.limit_backward)&&(i<(i=this.current.charCodeAt(this.cursor-1))||i>>3]&1<<(7&i)))&&(this.cursor--,!0)},this.go_out_grouping_b=function(t,r,i){for(;this.cursor>this.limit_backward;){var s=this.current.charCodeAt(this.cursor-1);if(s<=i&&r<=s&&0!=(t[(s-=r)>>>3]&1<<(7&s)))return!0;this.cursor--}return!1},this.eq_s=function(t){return!(this.limit-this.cursor>>1),o=0,a=e=(l=t[r])[0].length){if(this.cursor=s+l[0].length,l.length<4)return l[2];var g=l[3](this);if(this.cursor=s+l[0].length,g)return l[2]}}while(0<=(r=l[1]));return 0},this.find_among_b=function(t){for(var r=0,i=t.length,s=this.cursor,h=this.limit_backward,e=0,n=0,c=!1;;){for(var u,o=r+(i-r>>1),a=0,l=e=(u=t[r])[0].length){if(this.cursor=s-u[0].length,u.length<4)return u[2];var g=u[3](this);if(this.cursor=s-u[0].length,g)return u[2]}}while(0<=(r=u[1]));return 0},this.replace_s=function(t,r,i){var s=i.length-(r-t);return this.current=this.current.slice(0,t)+i+this.current.slice(r),this.limit+=s,this.cursor>=r?this.cursor+=s:this.cursor>t&&(this.cursor=t),s},this.slice_check=function(){return!(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>this.current.length)},this.slice_from=function(t){var r=!1;return this.slice_check()&&(this.replace_s(this.bra,this.ket,t),r=!0),r},this.slice_del=function(){return this.slice_from("")},this.insert=function(t,r,i){r=this.replace_s(t,r,i);t<=this.bra&&(this.bra+=r),t<=this.ket&&(this.ket+=r)},this.slice_to=function(){var t="";return t=this.slice_check()?this.current.slice(this.bra,this.ket):t},this.assign_to=function(){return this.current.slice(0,this.limit)}}; +var EnglishStemmer=function(){var a=new BaseStemmer,c=[["arsen",-1,-1],["commun",-1,-1],["emerg",-1,-1],["gener",-1,-1],["later",-1,-1],["organ",-1,-1],["past",-1,-1],["univers",-1,-1]],o=[["'",-1,1],["'s'",0,1],["'s",-1,1]],u=[["ied",-1,2],["s",-1,3],["ies",1,2],["sses",1,1],["ss",1,-1],["us",1,-1]],t=[["succ",-1,1],["proc",-1,1],["exc",-1,1]],l=[["even",-1,2],["cann",-1,2],["inn",-1,2],["earr",-1,2],["herr",-1,2],["out",-1,2],["y",-1,1]],n=[["",-1,-1],["ed",0,2],["eed",1,1],["ing",0,3],["edly",0,2],["eedly",4,1],["ingly",0,2]],f=[["",-1,3],["bb",0,2],["dd",0,2],["ff",0,2],["gg",0,2],["bl",0,1],["mm",0,2],["nn",0,2],["pp",0,2],["rr",0,2],["at",0,1],["tt",0,2],["iz",0,1]],_=[["anci",-1,3],["enci",-1,2],["ogi",-1,14],["li",-1,16],["bli",3,12],["abli",4,4],["alli",3,8],["fulli",3,9],["lessli",3,15],["ousli",3,10],["entli",3,5],["aliti",-1,8],["biliti",-1,12],["iviti",-1,11],["tional",-1,1],["ational",14,7],["alism",-1,8],["ation",-1,7],["ization",17,6],["izer",-1,6],["ator",-1,7],["iveness",-1,11],["fulness",-1,9],["ousness",-1,10],["ogist",-1,13]],m=[["icate",-1,4],["ative",-1,6],["alize",-1,3],["iciti",-1,4],["ical",-1,4],["tional",-1,1],["ational",5,2],["ful",-1,5],["ness",-1,5]],b=[["ic",-1,1],["ance",-1,1],["ence",-1,1],["able",-1,1],["ible",-1,1],["ate",-1,1],["ive",-1,1],["ize",-1,1],["iti",-1,1],["al",-1,1],["ism",-1,1],["ion",-1,2],["er",-1,1],["ous",-1,1],["ant",-1,1],["ent",-1,1],["ment",15,1],["ement",16,1]],k=[["e",-1,1],["l",-1,2]],g=[["andes",-1,-1],["atlas",-1,-1],["bias",-1,-1],["cosmos",-1,-1],["early",-1,5],["gently",-1,3],["howe",-1,-1],["idly",-1,2],["news",-1,-1],["only",-1,6],["singly",-1,7],["skies",-1,1],["sky",-1,-1],["ugly",-1,4]],d=[17,64],v=[17,65,16,1],i=[1,17,65,208,1],w=[55,141,2],p=!1,y=0,h=0;function q(){var r=a.limit-a.cursor;return!!(a.out_grouping_b(i,89,121)&&a.in_grouping_b(v,97,121)&&a.out_grouping_b(v,97,121)||(a.cursor=a.limit-r,a.out_grouping_b(v,97,121)&&a.in_grouping_b(v,97,121)&&!(a.cursor>a.limit_backward))||(a.cursor=a.limit-r,a.eq_s_b("past")))}function z(){return h<=a.cursor}function Y(){return y<=a.cursor}this.stem=function(){var r=a.cursor;if(!(()=>{var r;if(a.bra=a.cursor,0!=(r=a.find_among(g))&&(a.ket=a.cursor,!(a.cursora.limit)a.cursor=i;else{a.cursor=e,a.cursor=r,(()=>{p=!1;var r=a.cursor;if(a.bra=a.cursor,!a.eq_s("'")||(a.ket=a.cursor,a.slice_del())){a.cursor=r;r=a.cursor;if(a.bra=a.cursor,a.eq_s("y")){if(a.ket=a.cursor,!a.slice_from("Y"))return;p=!0}a.cursor=r;for(r=a.cursor;;){var i=a.cursor;r:{for(;;){var e=a.cursor;if(a.in_grouping(v,97,121)&&(a.bra=a.cursor,a.eq_s("y"))){a.ket=a.cursor,a.cursor=e;break}if(a.cursor=e,a.cursor>=a.limit)break r;a.cursor++}if(!a.slice_from("Y"))return;p=!0;continue}a.cursor=i;break}a.cursor=r}})(),h=a.limit,y=a.limit;i=a.cursor;r:{var s=a.cursor;if(0==a.find_among(c)){if(a.cursor=s,!a.go_out_grouping(v,97,121))break r;if(a.cursor++,!a.go_in_grouping(v,97,121))break r;a.cursor++}h=a.cursor,a.go_out_grouping(v,97,121)&&(a.cursor++,a.go_in_grouping(v,97,121))&&(a.cursor++,y=a.cursor)}a.cursor=i,a.limit_backward=a.cursor,a.cursor=a.limit;var e=a.limit-a.cursor,r=((()=>{var r=a.limit-a.cursor;if(a.ket=a.cursor,0==a.find_among_b(o))a.cursor=a.limit-r;else if(a.bra=a.cursor,!a.slice_del())return;if(a.ket=a.cursor,0!=(r=a.find_among_b(u)))switch(a.bra=a.cursor,r){case 1:if(a.slice_from("ss"))break;return;case 2:r:{var i=a.limit-a.cursor,e=a.cursor-2;if(!(e{a.ket=a.cursor,o=a.find_among_b(n),a.bra=a.cursor;r:{var r=a.limit-a.cursor;i:{switch(o){case 1:var i=a.limit-a.cursor;e:{var e=a.limit-a.cursor;if(0==a.find_among_b(t)||a.cursor>a.limit_backward){if(a.cursor=a.limit-e,!z())break e;if(!a.slice_from("ee"))return}}a.cursor=a.limit-i;break;case 2:break i;case 3:if(0==(o=a.find_among_b(l)))break i;switch(o){case 1:var s=a.limit-a.cursor;if(!a.out_grouping_b(v,97,121))break i;if(a.cursor>a.limit_backward)break i;if(a.cursor=a.limit-s,a.bra=a.cursor,a.slice_from("ie"))break;return;case 2:if(a.cursor>a.limit_backward)break i}}break r}a.cursor=a.limit-r;var c=a.limit-a.cursor;if(!a.go_out_grouping_b(v,97,121))return;if(a.cursor--,a.cursor=a.limit-c,!a.slice_del())return;a.ket=a.cursor,a.bra=a.cursor;var o,c=a.limit-a.cursor;switch(o=a.find_among_b(f)){case 1:return a.slice_from("e");case 2:var u=a.limit-a.cursor;if(a.in_grouping_b(d,97,111)&&!(a.cursor>a.limit_backward))return;a.cursor=a.limit-u;break;case 3:return a.cursor!=h||(u=a.limit-a.cursor,q()&&(a.cursor=a.limit-u,a.slice_from("e")))}if(a.cursor=a.limit-c,a.ket=a.cursor,a.cursor<=a.limit_backward)return;if(a.cursor--,a.bra=a.cursor,!a.slice_del())return}})(),a.cursor=a.limit-r,a.limit-a.cursor),r=(a.ket=a.cursor,e=a.limit-a.cursor,(a.eq_s_b("y")||(a.cursor=a.limit-e,a.eq_s_b("Y")))&&(a.bra=a.cursor,a.out_grouping_b(v,97,121))&&a.cursor>a.limit_backward&&a.slice_from("i"),a.cursor=a.limit-i,a.limit-a.cursor),e=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(_))&&(a.bra=a.cursor,z()))switch(r){case 1:if(a.slice_from("tion"))break;return;case 2:if(a.slice_from("ence"))break;return;case 3:if(a.slice_from("ance"))break;return;case 4:if(a.slice_from("able"))break;return;case 5:if(a.slice_from("ent"))break;return;case 6:if(a.slice_from("ize"))break;return;case 7:if(a.slice_from("ate"))break;return;case 8:if(a.slice_from("al"))break;return;case 9:if(a.slice_from("ful"))break;return;case 10:if(a.slice_from("ous"))break;return;case 11:if(a.slice_from("ive"))break;return;case 12:if(a.slice_from("ble"))break;return;case 13:if(a.slice_from("og"))break;return;case 14:if(!a.eq_s_b("l"))return;if(a.slice_from("og"))break;return;case 15:if(a.slice_from("less"))break;return;case 16:if(!a.in_grouping_b(w,99,116))return;if(a.slice_del())break}})(),a.cursor=a.limit-r,a.limit-a.cursor),i=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(m))&&(a.bra=a.cursor,z()))switch(r){case 1:if(a.slice_from("tion"))break;return;case 2:if(a.slice_from("ate"))break;return;case 3:if(a.slice_from("al"))break;return;case 4:if(a.slice_from("ic"))break;return;case 5:if(a.slice_del())break;return;case 6:if(!Y())return;if(a.slice_del())break}})(),a.cursor=a.limit-e,a.limit-a.cursor),r=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(b))&&(a.bra=a.cursor,Y()))switch(r){case 1:if(a.slice_del())break;return;case 2:var i=a.limit-a.cursor;if(!a.eq_s_b("s")&&(a.cursor=a.limit-i,!a.eq_s_b("t")))return;if(a.slice_del())break}})(),a.cursor=a.limit-i,a.limit-a.cursor),e=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(k)))switch(a.bra=a.cursor,r){case 1:if(!Y()){if(!z())return;var i=a.limit-a.cursor;if(q())return;a.cursor=a.limit-i}if(a.slice_del())break;return;case 2:if(!Y())return;if(!a.eq_s_b("l"))return;if(a.slice_del())break}})(),a.cursor=a.limit-r,a.cursor=a.limit_backward,a.cursor);(()=>{if(p)for(;;){var r=a.cursor;r:{for(;;){var i=a.cursor;if(a.bra=a.cursor,a.eq_s("Y")){a.ket=a.cursor,a.cursor=i;break}if(a.cursor=i,a.cursor>=a.limit)break r;a.cursor++}if(a.slice_from("y"))continue;return}a.cursor=r;break}})(),a.cursor=e}}return!0},this.stemWord=function(r){return a.setCurrent(r),this.stem(),a.getCurrent()}}; +window.Stemmer = EnglishStemmer; diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 00000000..d96755fd Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 00000000..7107cec9 Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 00000000..5f2b0a25 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #F00 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666 } /* Operator */ +.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #FFF0F0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #F00 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333 } /* Generic.Output */ +.highlight .gp { color: #C65D09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #04D } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070A0 } /* Literal.String */ +.highlight .na { color: #4070A0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0E84B5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60ADD5 } /* Name.Constant */ +.highlight .nd { color: #555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #D55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287E } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0E84B5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #BB60D5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #BBB } /* Text.Whitespace */ +.highlight .mb { color: #208050 } /* Literal.Number.Bin */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070A0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070A0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070A0 } /* Literal.String.Char */ +.highlight .dl { color: #4070A0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070A0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070A0 } /* Literal.String.Double */ +.highlight .se { color: #4070A0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070A0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70A0D0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #C65D09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070A0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287E } /* Name.Function.Magic */ +.highlight .vc { color: #BB60D5 } /* Name.Variable.Class */ +.highlight .vg { color: #BB60D5 } /* Name.Variable.Global */ +.highlight .vi { color: #BB60D5 } /* Name.Variable.Instance */ +.highlight .vm { color: #BB60D5 } /* Name.Variable.Magic */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 00000000..e29b1c75 --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,693 @@ +/* + * Sphinx JavaScript utilities for the full-text search. + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename, kind] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +// Global search result kind enum, used by themes to style search results. +// prettier-ignore +class SearchResultKind { + static get index() { return "index"; } + static get object() { return "object"; } + static get text() { return "text"; } + static get title() { return "title"; } +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _escapeHTML = (text) => { + return text + .replaceAll("&", "&") + .replaceAll("<", "<") + .replaceAll(">", ">") + .replaceAll('"', """) + .replaceAll("'", "'"); +}; + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename, kind] = item; + + let listItem = document.createElement("li"); + // Add a class representing the item's type: + // can be used by a theme's CSS selector for styling + // See SearchResultKind for the class names. + listItem.classList.add(`kind-${kind}`); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = _escapeHTML(title); + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + ` (${_escapeHTML(descr)})`; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) + // SPHINX_HIGHLIGHT_ENABLED is set in sphinx_highlight.js + highlightTerms.forEach((term) => + _highlightText(listItem, term, "highlighted"), + ); + } else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor), + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) + // SPHINX_HIGHLIGHT_ENABLED is set in sphinx_highlight.js + highlightTerms.forEach((term) => + _highlightText(listItem, term, "highlighted"), + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.", + ); + else + Search.status.innerText = Documentation.ngettext( + "Search finished, found one page matching the search query.", + "Search finished, found ${resultCount} pages matching the search query.", + resultCount, + ).replace("${resultCount}", resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5, + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => + query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter((term) => term); // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString( + htmlString, + "text/html", + ); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { + el.remove(); + }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector( + `[role="main"] ${anchor}`, + ); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`, + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template.", + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.setAttribute("role", "list"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords set is from language_data.js + if (stopwords.has(queryTermLower) || queryTerm.match(/^\d+$/)) return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { + // SPHINX_HIGHLIGHT_ENABLED is set in sphinx_highlight.js + localStorage.setItem( + "sphinx_highlight_terms", + [...highlightTerms].join(" "), + ); + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: ( + query, + searchTerms, + excludedTerms, + highlightTerms, + objectTerms, + ) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename, kind]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if ( + title.toLowerCase().trim().includes(queryLower) + && queryLower.length >= title.length / 2 + ) { + for (const [file, id] of foundTitles) { + const score = Math.round( + (Scorer.title * queryLower.length) / title.length, + ); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score + boost, + filenames[file], + SearchResultKind.title, + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && queryLower.length >= entry.length / 2) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round((100 * queryLower.length) / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + SearchResultKind.index, + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)), + ); + + // lookup as search terms in fulltext + normalResults.push( + ...Search.performTermsSearch(searchTerms, excludedTerms), + ); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result + .slice(0, 4) + .concat([result[5]]) + .map((v) => String(v)) + .join(","); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [ + searchQuery, + searchTerms, + excludedTerms, + highlightTerms, + objectTerms, + ] = Search._parseQuery(query); + const results = Search._performSearch( + searchQuery, + searchTerms, + excludedTerms, + highlightTerms, + objectTerms, + ); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4]; + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + SearchResultKind.object, + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => objectSearchCallback(prefix, array)), + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + // find documents, if any, containing the query word in their text/title term indices + // use Object.hasOwnProperty to avoid mismatching against prototype properties + const arr = [ + { + files: terms.hasOwnProperty(word) ? terms[word] : undefined, + score: Scorer.term, + }, + { + files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, + score: Scorer.title, + }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, new Map()); + const fileScores = scoreMap.get(file); + fileScores.set(word, record.score); + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2, + ).length; + if ( + wordList.length !== searchTerms.size + && wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file + || titleTerms[term] === file + || (terms[term] || []).includes(file) + || (titleTerms[term] || []).includes(file), + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w))); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + SearchResultKind.text, + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = + top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 00000000..a74e103a --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,159 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true; + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 + && !parent.classList.contains(className) + && !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore(span, parent.insertBefore(rest, node.nextSibling)); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect", + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target), + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms"); + // Update history only if '?highlight' is present; otherwise it + // clears text fragments (not set in window.location by the browser) + if (url.searchParams.has("highlight")) { + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + } + + // get individual terms from highlight string + const terms = highlight + .toLowerCase() + .split(/\s+/) + .filter((x) => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '", + ), + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms"); + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) + return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) + return; + if ( + DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + && event.key === "Escape" + ) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/api/diffpy.pdffit2.html b/api/diffpy.pdffit2.html new file mode 100644 index 00000000..51dd14f3 --- /dev/null +++ b/api/diffpy.pdffit2.html @@ -0,0 +1,1168 @@ + + + + + + + + + diffpy.pdffit2 package — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.pdffit2 package

+
+

Submodules

+
+

diffpy.pdffit2.output module

+

Take care of sending engine output to given file-like object.

+

The output file is stored in local module variable stdout.

+
+
+diffpy.pdffit2.output.redirect_stdout(dst)[source]
+

Redirect PDFfit2 standard output to a file-like object dst.

+

The dst value is stored in module variable stdout.

+
+ +
+
+

diffpy.pdffit2.pdffit module

+

PdfFit class for fitting a structural model to PDF data.

+
+
+class diffpy.pdffit2.pdffit.PdfFit(create_intro=True)[source]
+

Bases: object

+

Class for handling PdfFit calculations and refinements.

+
+
+stru_files
+

The list to store structure files.

+
+
Type:
+

list

+
+
+
+ +
+
+data_files
+

The list to store data files.

+
+
Type:
+

list

+
+
+
+ +
+
+FCON = {'FCOMP': 2, 'FSQR': 3, 'IDENT': 1, 'USER': 0}
+
+ +
+
+Sctp = {'N': 1, 'X': 0}
+
+ +
+
+add_structure(stru)[source]
+

add_structure(stru) –> Add new structure to PdfFit instance.

+

stru – instance of Structure class from diffpy.structure.

+

No return value. +Raises pdffit2.structureError when stru contains unknown +atom species.

+
+ +
+
+alloc(stype, qmax, qdamp, rmin, rmax, bin)[source]
+

Alloc(stype, qmax, qdamp, rmin, rmax, bin) –> Allocate space +for a PDF calculation.

+

The structure from which to calculate the PDF must first be imported +with the read_struct() or read_struct_string() method.

+

stype – ‘X’ (xray) or ‘N’ (neutron) +qmax – Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. +qdamp – instrumental Q-resolution factor +rmin – minimum r-value of calculation +rmax – maximum r-value of calculation +bin – number of data points in calculation

+
+
Raises:
+
    +
  • ValueError for bad input values

  • +
  • pdffit.unassignedError when no structure has been loaded

  • +
+
+
+
+ +
+
+bang(i, j, k)[source]
+

Bang(i, j, k) –> Show bond angle defined by atoms i, j, k.

+

No return value. Use bond_angle() to get the result.

+
+
Raises: ValueError if selected atom(s) does not exist

pdffit.unassignedError when no structure has been loaded

+
+
+
+ +
+
+blen(*args)[source]
+

Blen(i, j) –> Show bond length defined by atoms i and j.

+

i – index of the first atom starting at 1 +j – index of the second atom starting at 1

+

No return value. Use bond_length_atoms() to retrieve result.

+

Second form:

+

blen(a1, a2, lb, ub) –> Show sorted lengths of all a1-a2 bonds.

+

a1 – symbol of the first element in pair or “ALL” +a2 – symbol of the second element in pair or “ALL” +lb – lower bond length boundary +ub – upper bond length boundary

+

No return value. Use bond_length_types() to retrieve results.

+
+
Raises: ValueError if selected atom(s) does not exist

pdffit.unassignedError when no structure has been loaded

+
+
+
+ +
+
+bond_angle(i, j, k)[source]
+

bond_angle(i, j, k) –> bond angle defined by atoms i, j, k. +Angle is calculated using the shortest ji and jk lengths with +respect to periodic boundary conditions.

+

i, j, k – atom indices starting at 1

+

Return a tuple of (angle, angle_error), both values are in degrees.

+
+
Raises: ValueError if selected atom(s) does not exist

pdffit.unassignedError when no structure has been loaded

+
+
+
+ +
+
+bond_length_atoms(i, j)[source]
+

bond_length_atoms(i, j) –> shortest distance between atoms +i, j. Periodic boundary conditions are applied to find the +shortest bond.

+

i – index of the first atom starting at 1 +j – index of the second atom starting at 1

+

Return a tuple of (distance, distance_error).

+
+
Raises: ValueError if selected atom(s) does not exist

pdffit.unassignedError when no structure has been loaded.

+
+
+
+ +
+
+bond_length_types(a1, a2, lb, ub)[source]
+

bond_length_types(a1, a2, lb, ub) –> get all a1-a2 +distances.

+

a1 – symbol of the first element in pair or “ALL” +a2 – symbol of the second element in pair or “ALL” +lb – lower bond length boundary +ub – upper bond length boundary

+

Return a dictionary of distance data containing

+

dij : list of bond lengths within given bounds +ddij : list of bond length standard deviations +ij0 : pairs of atom indices starting from 0 +ij1 : pairs of atom indices starting from 1

+
+
Raises: ValueError if selected atom(s) does not exist

pdffit.unassignedError when no structure has been loaded.

+
+
+
+ +
+
+calc()[source]
+

Calc() –> Calculate the PDF of the imported structure.

+

Space for the calculation must first be allocated with the alloc() +method.

+
+
Raises:
+
    +
  • pdffit2.calculationError when allocated space cannot

  • +
  • accommodate calculation

  • +
  • pdffit.unassignedError when space for calculation has not been

  • +
  • allocated

  • +
+
+
+
+ +
+
+constrain(var, par, fcon=None)[source]
+

Constrain(var, par[, fcon]) –> Constrain a variable to a +parameter.

+

A variable can be constrained to a number or equation string.

+
+
Parameters:
+
    +
  • var – variable to constrain, such as x(1)

  • +
  • par (int or str) – parameter which to constrain the variable. This can be an +integer or an equation string containing a reference to +another parameter. Equation strings use standard C++ +syntax. The value of a constrained parameter is accessed +as @p in an equation string, where p is the +parameter.

  • +
  • fcon (str) – ‘USER’, ‘IDENT’, ‘FCOMP’, or ‘FSQR’. This is an optional +parameter; usage is currently unclear.

  • +
+
+
+

Example:

+
>>> constrain(x(1), 1)
+>>> constrain(x(2), "0.5+@1")
+
+
+
+
Raises:
+
    +
  • pdffit2.constraintError – if a constraint is bad

  • +
  • pdffit2.unassignedError – if variable does not yet exist

  • +
  • ValueError – if variable index does not exist (e.g. lat(7))

  • +
+
+
+
+ +
+
+static delta1()[source]
+

Delta1() –> Get reference to 1/R peak sharpening factor.

+
+ +
+
+static delta2()[source]
+

Delta2() –> Reference to (1/R^2) sharpening factor.

+

The phenomenological correlation constant in the Debye-Waller +factor. The (1/R^2) peak sharpening factor.

+
+ +
+
+static dscale()[source]
+

Dscale() –> Get reference to dscale.

+

The data scale factor.

+
+ +
+
+fixpar(par)[source]
+

Fixpar(par) –> Fix a parameter.

+

Fixed parameters are not fitted in a refinement. Passed parameter +can be ‘ALL’, in which case all parameters are fixed.

+

Raises: pdffit.unassignedError when parameter has not been assigned

+
+ +
+
+freepar(par)[source]
+

Freepar(par) –> Free a parameter.

+

Freed parameters are fitted in a refinement. Passed parameter +can be ‘ALL’, in which case all parameters are freed.

+

Raises: pdffit.unassignedError when parameter has not been assigned

+
+ +
+
+getR()[source]
+

GetR() –> Get r-points used in the fit.

+

This function should only be called after data has been loaded or +calculated. Before a refinement, the list of r-points will reflect the +data. Afterwards, they will reflect the fit range.

+

Raises: pdffit2.unassignedError if no data exists

+

Returns: List of equidistance r-points used in fit.

+
+ +
+
+get_atom_types(ip=None)[source]
+

get_atom_types() –> Ordered unique element symbols in the +structure.

+
+
ip – index of phase to get the elements from (starting from 1)

when ip is not given, use current phase

+
+
+

This function should only be called after a structure has been loaded.

+
+
Raises:
+

pdffit2.unassignedError if no structure exists

+
+
+

Returns: List of unique atom symbols as they occur in structure.

+
+ +
+
+get_atoms(ip=None)[source]
+

get_atoms() –> Get element symbols of all atoms in the +structure.

+
+
ip – index of phase to get the elements from (starting from 1)

when ip is not given, use current phase

+
+
+

This function should only be called after a structure has been loaded.

+

Raises: pdffit2.unassignedError if no structure exists

+

Returns: List of atom names in structure.

+
+ +
+
+get_scat(stype, element)[source]
+

get_scat(stype, element) –> Get active scattering factor for +given element. If scattering factor has been changed using +set_scat the result may depend on the active phase. When no +phase has been loaded, return the standard value.

+

stype – ‘X’ (xray) or ‘N’ (neutron). +element – case-insensitive element symbol such as “Na” or “CL”

+

Return float.

+
+
Raises:
+

ValueError if element is not known.

+
+
+
+ +
+
+get_scat_string(stype)[source]
+

get_scat_string(stype) –> Get string with scattering factors +of all atoms in the current phase.

+

stype – ‘X’ (xray) or ‘N’ (neutron).

+
+
Raises:
+

pdffit2.unassignedError if no phase exists

+
+
+

Returns: string with all scattering factors.

+
+ +
+
+get_structure(ip)[source]
+

get_structure(ip) –> Get a copy of specified phase data.

+

ip – index of existing PdfFit phase starting from 1

+

Return Structure object from diffpy.structure. +Raise pdffit2.unassignedError if phase ip is undefined.

+
+ +
+
+getcrw()[source]
+

Getcrw() –> Get cumulative Rw for the current dataset.

+

Cumulative Rw is a list of Rw partial sums cost values evaluated against +observed PDF data in the error sums evaluated against +the r-points in the fit.

+

Raises: pdffit2.unassignedError if no data exists

+

Returns: List of crw points, equidistant in r or empty list +if the refine function has not been called yet.

+
+ +
+
+getpar(par)[source]
+

Getpar(par) –> Get value of parameter.

+

Raises: ValueError if parameter does not exists

+
+ +
+
+getpdf_diff()[source]
+

Obtain difference between observed and fitted PDF.

+

This function should only be called after data has been loaded or +calculated. Before a refinement, the list of r-points will reflect the +data. Afterwards, they will reflect the fit range.

+

Raises: pdffit2.unassignedError if no data exists

+

Returns: List of data points, equidistant in r.

+
+ +
+
+getpdf_fit()[source]
+

getpdf_fit() –> Get fitted PDF.

+

This function should only be called after a refinement or refinement +step has been done.

+

Raises: pdffit2.unassignedError if no data exists

+

Returns: List of fitted points, equidistant in r.

+
+ +
+
+getpdf_obs()[source]
+

getpdf_obs() –> Get observed PDF.

+

This function should only be called after data has been loaded or +calculated. Before a refinement, the list of r-points will reflect the +data. Afterwards, they will reflect the fit range.

+

Raises: pdffit2.unassignedError if no data exists

+

Returns: List of data points, equidistant in r.

+
+ +
+
+getrw()[source]
+

Getrw() –> Get normalized total error of the fit rw.

+

getrw calculates total fit error summed for all datasets in the +fit.

+

Return float.

+
+ +
+
+getvar(var)[source]
+

Getvar(var) –> Get stored value of a variable.

+
+
Raises:
+
    +
  • pdffit2.unassignedError if variable does not yet exist

  • +
  • ValueError if variable index does not exist (e.g. lat(7))

  • +
+
+
+
+ +
+
+static intro()[source]
+

Show introductory message.

+
+ +
+
+static lat(n)[source]
+

Lat(n) –> Get reference to lattice variable n.

+

n can be an integer or a string representing the lattice +variable. 1 <==> ‘a’ 2 <==> ‘b’ 3 <==> ‘c’ 4 <==> ‘alpha’ 5 <==> +‘beta’ 6 <==> ‘gamma’

+
+ +
+
+num_atoms()[source]
+

num_atoms() –> Get number of atoms in current phase.

+

Raises: pdffit2.unassignedError if no atoms exist

+
+ +
+
+num_datasets()[source]
+

num_datasets() –> Number of datasets loaded in PdfFit +instance.

+

Use setdata to bring a specific dataset in focus.

+

Return integer.

+
+ +
+
+num_phases()[source]
+

num_phases() –> Number of phases loaded in PdfFit instance.

+

Use setphase to bring a specific phase in focus.

+

Return integer.

+
+ +
+
+static occ(i)[source]
+

Occ(i) –> Get reference to occupancy of atom i.

+
+ +
+
+pdesel(ip)[source]
+

Pdesel(ip) –> Exclude phase ip from calculation of total +PDF.

+

pdesel(‘ALL’) excludes all phases from PDF calculation.

+

Raises: pdffit2.unassignedError if selected phase does not exist

+
+ +
+
+pdfrange(iset, rmin, rmax)[source]
+

Pdfrange(iset, rmin, rmax) –> Set the range of the fit.

+

iset – data set to consider +rmin – minimum r-value of fit +rmax – maximum r-value of fit

+

Raises: ValueError for bad input values

+
+ +
+
+phase_fractions()[source]
+

phase_fractions() –> relative phase fractions for current +dataset. Convert phase scale factors to relative phase fractions +given the scattering type of current dataset.

+

Return a dictionary of phase fractions with following keys:

+

“atom” – list of fractions normalized to atom count +“stdatom” – errors of atom count fractions +“cell” – list of fractions normalized to unit cell count +“stdcell” – errors of unit cell count fractions +“mass” – list of relative weight fractions +“stdmass” – errors of relative weight fractions

+

Raises: pdffit2.unassignedError if no dataset exists.

+
+ +
+
+static pscale()[source]
+

Pscale() –> Get reference to pscale.

+

pscale is the fraction of the total structure that the current +phase represents.

+
+ +
+
+psel(ip)[source]
+

Psel(ip) –> Include phase ip in calculation of total PDF.

+

psel(‘ALL’) selects all phases for PDF calculation.

+

Raises: pdffit2.unassignedError if selected phase does not exist

+
+ +
+
+static qbroad()[source]
+

Qbroad() –> Get reference to qbroad.

+

Quadratic peak broadening factor.

+
+ +
+
+static qdamp()[source]
+

Qdamp() –> Get reference to qdamp.

+

Qdamp controls PDF damping due to instrument Q-resolution.

+
+ +
+
+static rcut()[source]
+

Rcut() –> Get reference to rcut.

+

rcut is the value of r below which peak sharpening, defined by +the sigma ratio (sratio), applies. rcut cannot be refined.

+
+ +
+
+read_data(data, stype, qmax, qdamp)[source]
+

read_data(data, stype, qmax, qdamp) –> Read pdf data from +file into memory.

+

data – name of file from which to read data +stype – ‘X’ (xray) or ‘N’ (neutron) +qmax – Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. +qdamp – instrumental Q-resolution factor

+

Raises: IOError when the file cannot be read from disk

+
+ +
+
+read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data=None, name='list')[source]
+

read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data += None, name = “list”) –> Read pdf data into memory from lists.

+

All lists must be of the same length. +stype – ‘X’ (xray) or ‘N’ (neutron) +qmax – Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. +qdamp – instrumental Q-resolution factor +r_data – list of r-values +Gr_data – list of G(r) values +dGr_data – list of G(r) uncertainty values +name – tag with which to label data

+

Raises: ValueError when the data lists are of different length

+
+ +
+
+read_data_string(data, stype, qmax, qdamp, name='')[source]
+

read_data_string(data, stype, qmax, qdamp, name = “”) –> +Read pdf data from a string into memory.

+

data – string containing the contents of the data file +stype – ‘X’ (xray) or ‘N’ (neutron) +qmax – Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. +qdamp – instrumental Q-resolution factor +name – tag with which to label data

+
+ +
+
+read_struct(struct)[source]
+

read_struct(struct) –> Read structure from file into memory.

+

struct – name of file from which to read structure

+
+
Raises:
+
    +
  • pdffit2.calculationError when a lattice cannot be created from the

  • +
  • given structure

  • +
  • pdffit2.structureError when a structure file is malformed

  • +
  • IOError when the file cannot be read from the disk

  • +
+
+
+
+ +
+
+read_struct_string(struct, name='')[source]
+

read_struct_string(struct, name = “”) –> Read structure from +a string into memory.

+

struct – string containing the contents of the structure file +name – tag with which to label structure

+
+
Raises:
+
    +
  • pdffit2.calculationError when a lattice cannot be created from the

  • +
  • given structure

  • +
  • pdffit2.structureError when a structure file is malformed

  • +
+
+
+
+ +
+
+refine(toler=1e-08)[source]
+

Refine(toler = 0.00000001) –> Fit the theory to the imported +data.

+

toler – tolerance of the fit

+
+
Raises:
+
    +
  • pdffit2.calculationError when the model pdf cannot be calculated

  • +
  • pdffit2.constraintError when refinement fails due to bad

  • +
  • constraint

  • +
  • pdffit2.unassigedError when a constraint used but never initialized

  • +
  • using setpar()

  • +
+
+
+
+ +
+
+refine_step(toler=1e-08)[source]
+

refine_step(toler = 0.00000001) –> Run a single step of the +fit.

+

toler – tolerance of the fit

+
+
Raises:
+
    +
  • pdffit2.calculationError when the model pdf cannot be calculated

  • +
  • pdffit2.constraintError when refinement fails due to bad

  • +
  • constraint

  • +
  • pdffit2.unassigedError when a constraint used but never initialized

  • +
  • using setpar()

  • +
+
+
+

Returns: 1 (0) if refinement is (is not) finished

+
+ +
+
+reset()[source]
+

Reset() –> Clear all stored fit, structure, and parameter +data.

+
+ +
+
+reset_scat(element)[source]
+

reset_scat(stype, element) –> Reset scattering factors for +given element to their standard values. The reset_scat applies +only for the current phase.

+

element – case-insensitive element symbol such as “Na” or “CL” +:raises pdffit2.unassignedError if no phase exists: +:raises ValueError if element is not known.:

+
+ +
+
+save_dif(iset, fname)[source]
+

save_dif(iset, fname) –> Save data and fitted PDF difference +to file.

+

iset – data set to save

+
+
Raises:
+
    +
  • IOError if file cannot be saved

  • +
  • pdffit2.unassignedError if the data set is undefined

  • +
+
+
+
+ +
+
+save_dif_string(iset)[source]
+

save_dif_string(iset) –> Save data and fitted PDF difference +to string.

+

iset – data set to save

+
+
Raises:
+

pdffit2.unassignedError if the data set is undefined

+
+
+

Returns: string containing contents of save file

+
+ +
+
+save_pdf(iset, fname)[source]
+

save_pdf(iset, fname) –> Save calculated or fitted PDF to +file.

+

iset – data set to save

+
+
Raises:
+
    +
  • IOError if file cannot be saved

  • +
  • pdffit2.unassignedError if the data set is undefined

  • +
+
+
+
+ +
+
+save_pdf_string(iset)[source]
+

save_pdf_string(iset) –> Save calculated or fitted PDF to +string.

+

iset – data set to save

+
+
Raises:
+

pdffit2.unassignedError if the data set is undefined

+
+
+

Returns: string containing contents of save file

+
+ +
+
+save_res(fname)[source]
+

save_res(fname) –> Save fit-specific data to file.

+
+
Raises:
+
    +
  • IOError if file cannot be saved

  • +
  • pdffit2.unassignedError if there is no refinement data to save

  • +
+
+
+
+ +
+
+save_res_string()[source]
+

save_res_string() –> Save fit-specific data to a string.

+
+
Raises:
+

pdffit2.unassignedError if there is no refinement data to save

+
+
+

Returns: string containing contents of save file

+
+ +
+
+save_struct(ip, fname)[source]
+

save_struct(ip, fname) –> Save structure resulting from fit +to file.

+

ip – phase to save

+
+
Raises:
+
    +
  • IOError if file cannot be saved

  • +
  • pdffit2.unassignedError if the data set is undefined

  • +
+
+
+
+ +
+
+save_struct_string(ip)[source]
+

save_struct(ip) –> Save structure resulting from fit to +string.

+

ip – phase to save

+
+
Raises:
+

pdffit2.unassignedError if phase ip is undefined.

+
+
+

Returns: string containing contents of save file

+
+ +
+
+selalias = {'ALL': -1}
+
+ +
+
+selectAll(ip, ijchar)[source]
+

Configure partial PDF - include all atoms of phase ip as first or +second element in pair for distance evaluation.

+

ip – phase index starting at 1 +ijchar – ‘i’ or ‘j’ for first or second in pair

+
+
Raises:
+
    +
  • pdffit2.unassignedError if selected phase does not exist

  • +
  • ValueError if ijchar is invalid

  • +
+
+
+
+ +
+
+selectAtomIndex(ip, ijchar, aidx, flag)[source]
+

Configure partial PDF - mark the atom of given index in phase ip +as included or excluded as a first or second in pair for distance +evaluation.

+

ip – phase index starting at 1 +ijchar – ‘i’ or ‘j’ for first or second in pair +aidx – integer index of atom starting at 1 +flag – bool flag, True for selection, False for exclusion

+
+
Raises:
+
    +
  • pdffit2.unassignedError if selected phase does not exist

  • +
  • ValueError if atom index or ijchar are invalid

  • +
+
+
+
+ +
+
+selectAtomType(ip, ijchar, symbol, flag)[source]
+

Configure partial PDF - mark the specified atom type in phase ip +as included or excluded as a first or second in pair for distance +evaluation.

+

ip – phase index starting at 1 +ijchar – ‘i’ or ‘j’ for first or second in pair +symbol – element symbol +flag – bool flag, True for selection, False for exclusion

+
+
Raises:
+
    +
  • pdffit2.unassignedError if selected phase does not exist

  • +
  • ValueError for invalid value of ijchar

  • +
+
+
+
+ +
+
+selectNone(ip, ijchar)[source]
+

Configure partial PDF - exclude all atoms of phase ip from first +or second element of pair distance evaluation.

+

ip – phase index starting at 1 +ijchar – ‘i’ or ‘j’ for first or second in pair

+
+
Raises:
+
    +
  • pdffit2.unassignedError if selected phase does not exist

  • +
  • ValueError if ijchar is invalid

  • +
+
+
+
+ +
+
+set_scat(stype, element, value)[source]
+

set_scat(stype, element, value) –> Set custom scattering +factor for given element. The new scattering factor applies +only for the current phase, in other phases it keeps its default +value.

+

stype – ‘X’ (xray) or ‘N’ (neutron). +element – case-insensitive element symbol such as “Na” or “CL” +value – new value of scattering factor

+

No return value.

+
+
Raises:
+
    +
  • pdffit2.unassignedError if no phase exists.

  • +
  • ValueError if element is not known.

  • +
+
+
+

See also reset_scat, get_scat.

+
+ +
+
+setdata(iset)[source]
+

Setdata(iset) –> Set the data set in focus.

+

iset – integer index of data set starting at 1.

+

Raises: pdffit.unassignedError when data set does not exist

+
+ +
+
+setpar(par, val)[source]
+

Setpar(par, val) –> Set value of constrained parameter.

+

val – Either a numerical value or a reference to a variable

+
+
Raises:
+

pdffit2.unassignedError when variable is yet to be assigned

+
+
+
+ +
+
+setphase(ip)[source]
+

Setphase(ip) –> Switch to phase ip.

+

ip – index of the phase starting at 1.

+

All parameters assigned after this method is called refer only to the +current phase.

+

Raises: pdffit.unassignedError when phase does not exist

+
+ +
+
+setvar(var, val)[source]
+

Setvar(var, val) –> Set the value of a variable.

+
+
Raises:
+
    +
  • pdffit2.unassignedError if variable does not yet exist

  • +
  • ValueError if variable index does not exist (e.g. lat(7))

  • +
+
+
+
+ +
+
+show_scat(stype)[source]
+

show_scat(stype) –> Print scattering length for all atoms in +the current phase.

+

stype – ‘X’ (xray) or ‘N’ (neutron).

+

Raises: pdffit2.unassignedError if no phase exists

+
+ +
+
+show_struct(ip)[source]
+

show_struct(ip) –> Print structure resulting from fit.

+

ip – phase to display

+

Raises: pdffit2.unassignedError if the phase is undefined

+
+ +
+
+static spdiameter()[source]
+

Spdiameter() –> Get reference to spdiameter (phase +property).

+

Diameter value for the spherical particle PDF correction. +Spherical envelope is not applied when spdiameter equals 0.

+
+ +
+
+static sratio()[source]
+

Sratio() –> Get reference to sigma ratio.

+

The sigma ratio determines the reduction in the Debye-Waller +factor for distances below rcut.

+
+ +
+
+static stepcut()[source]
+

Stepcut() –> Get reference to stepcut (phase property).

+

stepcut is cutoff radius for empirical step-function PDF +envelope. stepcut can be used to approximate loss of pair +correlations in amorphous phase. stepcut cannot be refined.

+

Step cutoff is not applied when stepcut equals 0.

+
+ +
+
+static u11(i)[source]
+

U11(i) –> Get reference to U(1,1) for atom i.

+

U is the anisotropic thermal factor tensor.

+
+ +
+
+static u12(i)[source]
+

U12(i) –> Get reference to U(1,2) for atom i.

+

U is the anisotropic thermal factor tensor.

+
+ +
+
+static u13(i)[source]
+

U13(i) –> Get reference to U(1,3) for atom i.

+

U is the anisotropic thermal factor tensor.

+
+ +
+
+static u22(i)[source]
+

U22(i) –> Get reference to U(2,2) for atom i.

+

U is the anisotropic thermal factor tensor.

+
+ +
+
+static u23(i)[source]
+

U23(i) –> Get reference to U(2,3) for atom i.

+

U is the anisotropic thermal factor tensor.

+
+ +
+
+static u33(i)[source]
+

U33(i) –> Get reference to U(3,3) for atom i.

+

U is the anisotropic thermal factor tensor.

+
+ +
+
+static x(i)[source]
+

X(i) –> Get reference to x-value of atom i.

+
+ +
+
+static y(i)[source]
+

Y(i) –> Get reference to y-value of atom i.

+
+ +
+
+static z(i)[source]
+

Z(i) –> Get reference to z-value of atom i.

+
+ +
+ +
+
+

diffpy.pdffit2.ipy_ext module

+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/cookiecutter.json b/cookiecutter.json deleted file mode 100644 index 8cf6acc5..00000000 --- a/cookiecutter.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "author_names": "Simon Billinge", - "author_emails": "sbillinge@ucsb.edu", - "maintainer_names": "Simon Billinge", - "maintainer_emails": "sbillinge@ucsb.edu", - "maintainer_github_usernames": "sbillinge", - "contributors": "Pavol Juhas, Chris Farrow, Simon Billinge, Billinge Group members", - "license_holders": "The Trustees of Columbia University in the City of New York", - "project_name": "diffpy.pdffit2", - "github_username_or_orgname": "diffpy", - "github_repo_name": "diffpy.pdffit2", - "conda_pypi_package_dist_name": "diffpy.pdffit2", - "package_dir_name": "diffpy.pdffit2", - "project_short_description": "PDFfit2 - real space structure refinement program.", - "project_keywords": "PDF, structure refinement", - "minimum_supported_python_version": "3.12", - "maximum_supported_python_version": "3.14", - "project_needs_c_code_compiled": "Yes", - "project_has_gui_tests": "No" -} diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index ef016bb8..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,194 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build -BASENAME = $(subst .,,$(subst $() $(),,diffpy.pdffit2)) - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(BASENAME).qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(BASENAME).qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/$(BASENAME)" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/$(BASENAME)" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -# Manual publishing to the gh-pages branch - -GITREPOPATH = $(shell cd $(CURDIR) && git rev-parse --git-dir) -GITREMOTE = origin -GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE).url) -GITLASTCOMMIT = $(shell git rev-parse --short HEAD) - -publish: - @test -d build/html || \ - ( echo >&2 "Run 'make html' first!"; false ) - git show-ref --verify --quiet refs/heads/gh-pages || \ - git branch --track gh-pages $(GITREMOTE)/gh-pages - test -d build/gh-pages || \ - git clone -s -b gh-pages $(GITREPOPATH) build/gh-pages - cd build/gh-pages && \ - git pull $(GITREMOTEURL) gh-pages - rsync -acv --delete --exclude=.git --exclude=.rsync-exclude \ - --exclude-from=build/gh-pages/.rsync-exclude \ - --link-dest=$(CURDIR)/build/html build/html/ build/gh-pages/ - cd build/gh-pages && \ - git add --all . && \ - git diff --cached --quiet || \ - git commit -m "Sync with the source at $(GITLASTCOMMIT)." - cd build/gh-pages && \ - git push origin gh-pages diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index ac53d5bd..00000000 --- a/docs/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build -set SPHINXPROJ=PackagingScientificPython - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 9de6b62e..00000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# diffpy.pdffit2 documentation build configuration file, created by # noqa: E501 -# sphinx-quickstart on Thu Jan 30 15:49:41 2014. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import time -from importlib.metadata import version -from pathlib import Path - -# Attempt to import the version dynamically from GitHub tag. -try: - fullversion = version("diffpy.pdffit2") -except Exception: - fullversion = "No version found. The correct version will appear in the released version." # noqa: E501 - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501 -# sys.path.insert(0, str(Path(".").resolve())) -sys.path.insert(0, str(Path("../..").resolve())) -sys.path.insert(0, str(Path("../../src").resolve())) - -# abbreviations -ab_authors = ( - "Pavol Juhas, Chris Farrow, Simon Billinge, Billinge Group members" -) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx.ext.todo", - "sphinx.ext.viewcode", - "sphinx.ext.intersphinx", - "sphinx_rtd_theme", - "sphinx_copybutton", - "m2r2", -] - -autodoc_mock_imports = [ - "diffpy.pdffit2.pdffit2", -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = [".rst", ".md"] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = "diffpy.pdffit2" -copyright = "%Y, The Trustees of Columbia University in the City of New York" - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. - -# The short X.Y version. -version = "".join(fullversion.split(".post")[:1]) -# The full version, including alpha/beta/rc tags. -release = fullversion - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -today = time.strftime("%B %d, %Y", time.localtime()) -year = today.split()[-1] -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' -# substitute YEAR in the copyright string -copyright = copyright.replace("%Y", year) - -# For sphinx_copybutton extension. -# Do not copy "$" for shell commands in code-blocks. -copybutton_prompt_text = r"^\$ " -copybutton_prompt_is_regexp = True - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ["build"] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# A list of ignored prefixes for module index sorting. -modindex_common_prefix = ["diffpy.pdffit2"] - -# Display all warnings for missing links. -nitpicky = True - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -html_context = { - "display_github": True, - "github_user": "diffpy", - "github_repo": "diffpy.pdffit2", - "github_version": "main", - "conf_py_path": "/docs/source/", -} - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -html_theme_options = { - "navigation_with_keys": "true", -} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Output file base name for HTML help builder. -basename = "diffpy.pdffit2".replace(" ", "").replace(".", "") -htmlhelp_basename = basename + "doc" - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - "index", - "diffpy.pdffit2.tex", - "diffpy.pdffit2 Documentation", - ab_authors, - "manual", - ), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ( - "index", - "diffpy.pdffit2", - "diffpy.pdffit2 Documentation", - ab_authors, - 1, - ) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - "index", - "diffpy.pdffit2", - "diffpy.pdffit2 Documentation", - ab_authors, - "diffpy.pdffit2", - "One line description of project.", - "Miscellaneous", - ), -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/examples.html b/examples.html new file mode 100644 index 00000000..76afb817 --- /dev/null +++ b/examples.html @@ -0,0 +1,286 @@ + + + + + + + + + Examples — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Examples

+

Welcome! This guide offers several examples to help you effectively utilize this package.

+

Files needed:

+
+
    +
  1. Ni-xray.gr - experimental X-ray PDF data

  2. +
  3. Ni.stru - Ni f.c.c. structure in PDFfit format

  4. +
+
+
+

Example 1: Calculate PDF of FCC nickel

+

The first example shows how to calculate the PDF for FCC nickel and save the resulting data +to a file and plot it using matplotlib.

+
    +
  1. Import the PdfFit class from the diffpy.pdffit2 module

  2. +
+
from diffpy.pdffit2 import PdfFit
+
+
+

2. Create a PDF calculator object and assign it to the variable P. +Make sure the Ni.stru file is in the same directory as the script (or specify +the relative path to where it resides) +and you are currently in this directory. Then use read_struct to read the structure +file, alloc to configure the PDF +calculation, and then use calc to carry out the the calculation.

+
# create new PDF calculator object
+P = PdfFit()
+
+# load structure file in PDFFIT or DISCUS format
+P.read_struct("Ni.stru")
+
+radiation_type = "X"  # x-rays
+qmax = 30.0  # Q-cutoff used in PDF calculation in 1/A
+qdamp = 0.01  # instrument Q-resolution factor, responsible for PDF decay
+rmin = 0.01  # minimum r-value
+rmax = 30.0  # maximum r-value
+npts = 3000  # number of points in the r-grid
+
+# allocate and configure PDF calculation
+P.alloc(radiation_type, qmax, qdamp, rmin, rmax, npts)
+P.calc()
+
+
+
    +
  1. Save the calculated PDF.

  2. +
+
P.save_pdf(1, "Ni_calculation.cgr")
+
+
+
    +
  1. We can also plot it using matplotlib

  2. +
+
import matplotlib.pyplot as plt
+
+# obtain list of r-points and corresponding G values
+r = P.getR()
+G = P.getpdf_fit()
+
+plt.plot(r, G)
+plt.xlabel("r (Å)")
+plt.ylabel("G (Å$^{-2}$)")
+plt.title("x-ray PDF of nickel simulated at Qmax = %g" % qmax)
+
+# display plot window, this must be the last command in the script
+plt.show()
+
+
+

The scripts used in this example can be +downloaded here.

+
+
+

Example 2: Performing simple refinement

+

The second example shows how to perform a simple refinement of the Ni structure to +the experimental x-ray PDF. The example uses the same data files as the first example.

+
    +
  1. Import the PdfFit class from the diffpy.pdffit2 module

  2. +
+
from diffpy.pdffit2 import PdfFit
+
+
+

2. Create a PDF calculator object and assign it to the variable pf. +Load the experimental x-ray PDF data using read_data and also load +the nickel structure file.

+
# Create new PDF calculator object.
+pf = PdfFit()
+
+# Load experimental x-ray PDF data
+qmax = 30.0  # Q-cutoff used in PDF calculation in 1/A
+qdamp = 0.01  # instrument Q-resolution factor, responsible for PDF decay
+pf.read_data("Ni-xray.gr", "X", qmax, qdamp)
+
+# Load nickel structure, must be in PDFFIT or DISCUS format
+pf.read_struct("Ni.stru")
+
+
+

3. Configure the refinement, assigning structural parameters to variables. For more +information on how to do this correctly, please read the PDFgui documentation. +Set initial values for the variables using setpar. +Finally, you can configure the range over which to refine (pdfrange) and +run the refinement (refine).

+
# Refine lattice parameters a, b, c.
+# Make them all equal to parameter @1.
+pf.constrain(pf.lat(1), "@1")
+pf.constrain(pf.lat(2), "@1")
+pf.constrain(pf.lat(3), "@1")
+# set initial value of parameter @1
+pf.setpar(1, pf.lat(1))
+
+# Refine phase scale factor.  Right side can have formulas.
+pf.constrain("pscale", "@20 * 2")
+pf.setpar(20, pf.getvar(pf.pscale) / 2.0)
+
+# Refine PDF damping due to instrument Q-resolution.
+# Left side can be also passed as a reference to PdfFit object
+pf.constrain(pf.qdamp, "@21")
+pf.setpar(21, 0.03)
+
+# Refine sharpening factor for correlated motion of close atoms.
+pf.constrain(pf.delta2, 22)
+pf.setpar(22, 0.0003)
+
+# Set all temperature factors isotropic and equal to @4
+for idx in range(1, 5):
+    pf.constrain(pf.u11(idx), "@4")
+    pf.constrain(pf.u22(idx), "@4")
+    pf.constrain(pf.u33(idx), "@4")
+pf.setpar(4, pf.u11(1))
+
+# Refine all parameters
+pf.pdfrange(1, 1.5, 19.99)
+pf.refine()
+
+
+

4. Save the refined result. save_struct saves the new, refined, structure to a +.stru format file. save_res saves the outputs in a structured text file.

+
pf.save_pdf(1, "Ni_refinement.fgr")
+pf.save_struct(1, "Ni_refinement.rstr")
+pf.save_res("Ni_refinement.res")
+
+
+
    +
  1. We can also plot it using matplotlib

  2. +
+
import matplotlib.pyplot as plt
+import numpy
+
+# obtain data from PdfFit calculator object
+r = pf.getR()
+Gobs = pf.getpdf_obs()
+Gfit = pf.getpdf_fit()
+
+# calculate difference curve
+Gdiff = numpy.array(Gobs) - numpy.array(Gfit)
+Gdiff_baseline = -10
+
+plt.plot(r, Gobs, "ko")
+plt.plot(r, Gfit, "b-")
+plt.plot(r, Gdiff + Gdiff_baseline, "r-")
+
+plt.xlabel("r (Å)")
+plt.ylabel("G (Å$^{-2}$)")
+plt.title("Fit of nickel to x-ray experimental PDF")
+
+# display plot window, this must be the last command in the script
+plt.show()
+
+
+

The scripts can be downloaded from here.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/genindex.html b/genindex.html new file mode 100644 index 00000000..4be0f645 --- /dev/null +++ b/genindex.html @@ -0,0 +1,473 @@ + + + + + + + + Index — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + +

Index

+ +
+ A + | B + | C + | D + | F + | G + | I + | L + | M + | N + | O + | P + | Q + | R + | S + | U + | X + | Y + | Z + +
+

A

+ + + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

I

+ + +
+ +

L

+ + + +
+ +

M

+ + +
+ +

N

+ + + +
+ +

O

+ + +
+ +

P

+ + + +
+ +

Q

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

U

+ + + +
+ +

X

+ + +
+ +

Y

+ + +
+ +

Z

+ + +
+ + + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..b1c8c264 --- /dev/null +++ b/index.html @@ -0,0 +1,215 @@ + + + + + + + + + diffpy.pdffit2 documentation — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.pdffit2 documentation

+

diffpy.pdffit2 - PDFfit2 - real space structure refinement program.

+
+
Software version 1.6.0
+
Last updated March 27, 2026.
+
+
+

Getting started

+

Welcome to the diffpy.pdffit2 documentation!

+

The diffpy.pdffit2 package provides functions for the calculation and +refinement of atomic Pair Distribution Functions (PDF) from crystal +structure models. It is used as a computational engine by PDFgui. All +refinements possible in PDFgui can be done by writing python scripts +directly with diffpy.pdffit2, +although less conveniently and with a fair knowledge of Python. +However, we recommend using diffpy-cmi for carrying +out more advanced, python-scripted refinements of nanostructure.

+

The PDFfit2 package includes an extension for the interactive IPython shell, these days commonly used within +Jupyter notebooks, which tries to mimic the old PDFFIT +program. To start IPython with this extension and also with plotting +functions enabled, use

+
ipython --ext=diffpy.pdffit2.ipy_ext --pylab
+
+
+

The IPython extension is suitable for interactive use, however +refinement scripts should be preferably written as a standard +Python code. This is more reliable and needs only a few extra +statements.

+
+
+

Authors

+

This code was derived from the first PDFFIT program written by Thomas Proffen +and Simon Billinge, which was a FORTRAN implementation of the original +“Real-space Rietveld” code +written by Simon Billinge (Billinge, S. J. L. “Real-space Rietveld: full profile structure refinement of the atomic pair distribution +function”. In: Local Structure from Diffraction. Ed. by S. J. L. Billinge and M. F. Thorpe. New York: +Plenum, 1998, p. 137). +The sources were converted to C++ by Jacques Bloch and then extensively hacked, +extended and purged from most glaring bugs by Chris Farrow and Pavol Juhas. +This code is currently maintained as part of the DiffPy project to create +python modules for structure investigations from diffraction data.

+

The DiffPy team is located in the Billinge-group at the Applied Physics +and Applied Mathematics Department of the Columbia University in New York. +Previous significant contributors to this code were made by

+
+

Pavol Juhas, Chris Farrow, Jacques Bloch, Wenduo Zhou

+
+

with more recent contributions from Billinge-group members. +For a more detailed list of contributors see +https://github.com/diffpy/diffpy.pdffit2/graphs/contributors.

+
+
+

Reference

+

If you use this program for a scientific research that leads to publication, +we ask that you acknowledge use of the program by citing the following paper +in your publication:

+
+

C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen +and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure +in crystals (https://stacks.iop.org/0953-8984/19/335219), J. Phys.: Condens. Matter, 19, 335219 (2007)

+
+
+
+

Installation

+

See the README +file included with the distribution.

+
+
+

Acknowledgements

+

diffpy.pdffit2 is built and maintained with scikit-package.

+
+
+

Table of contents

+ +
+
+

Indices

+ +
+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/license.html b/license.html new file mode 100644 index 00000000..9832cb23 --- /dev/null +++ b/license.html @@ -0,0 +1,150 @@ + + + + + + + + + License — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

License

+

This program is part of the DiffPy and DANSE open-source projects +and is available subject to the conditions and terms laid out below.

+

If you use this program to do productive scientific research that leads +to publication, we ask that you acknowledge use of the program by citing +the following paper in your publication:

+

` +C. L. Farrow, P. Juhás, J. W. Liu, D. Bryndin, E. S. Božin, J. Bloch, Th. Proffen +and S. J. L. Billinge, PDFfit2 and PDFgui: computer programs for studying nanostructure +in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007) +`

+

Copyright 2006-2007, Board of Trustees of Michigan State University, +Copyright 2008-2025, Board of Trustees of Columbia University in the city of New York. +(Copyright holder indicated in each source file).

+

For more information please visit the project web-page: +[http://www.diffpy.org/](http://www.diffpy.org/) +or email Prof. Simon Billinge at [sb2896@columbia.edu](mailto:sb2896@columbia.edu)

+

Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met:

+
    +
  1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer.

  2. +
  3. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution.

  4. +
  5. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission.

  6. +
+

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/news/TEMPLATE.rst b/news/TEMPLATE.rst deleted file mode 100644 index 790d30b1..00000000 --- a/news/TEMPLATE.rst +++ /dev/null @@ -1,23 +0,0 @@ -**Added:** - -* - -**Changed:** - -* - -**Deprecated:** - -* - -**Removed:** - -* - -**Fixed:** - -* - -**Security:** - -* diff --git a/objects.inv b/objects.inv new file mode 100644 index 00000000..26fc685e Binary files /dev/null and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 00000000..aeda6128 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,129 @@ + + + + + + + + Python Module Index — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ . +
+ + + + + + + + + + +
 
+ .
    + diffpy.pdffit2.output +
    + diffpy.pdffit2.pdffit +
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 394308b1..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,88 +0,0 @@ -[build-system] -requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"] -build-backend = "setuptools.build_meta" - -[project] -name = "diffpy.pdffit2" -dynamic=['version', 'dependencies'] -authors = [ - {name='Simon Billinge', email='sbillinge@ucsb.edu'}, -] -maintainers = [ - {name='Simon Billinge', email='sbillinge@ucsb.edu'}, -] -description = "PDFfit2 - real space structure refinement program." -keywords = ['PDF', 'structure refinement'] -readme = "README.rst" -requires-python = ">=3.12, <3.15" -classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX', - 'Operating System :: Unix', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3.14', - 'Topic :: Scientific/Engineering :: Physics', - 'Topic :: Scientific/Engineering :: Chemistry', -] - -[project.urls] -Homepage = "https://github.com/diffpy/diffpy.pdffit2/" -Issues = "https://github.com/diffpy/diffpy.pdffit2/issues/" - -[tool.setuptools-git-versioning] -enabled = true -template = "{tag}" -dev_template = "{tag}" -dirty_template = "{tag}" - -[tool.setuptools.packages.find] -where = ["src"] # list of folders that contain the packages (["."] by default) -include = ["*"] # package names should match these glob patterns (["*"] by default) -exclude = [] # exclude packages matching these glob patterns (empty by default) -namespaces = false # to disable scanning PEP 420 namespaces (true by default) - -[project.scripts] -diffpy-pdffit2 = "diffpy.pdffit2_app:main" - -[tool.setuptools.dynamic] -dependencies = {file = ["requirements/pip.txt"]} - -[tool.codespell] -exclude-file = ".codespell/ignore_lines.txt" -ignore-words = ".codespell/ignore_words.txt" -skip = "*.cif,*.dat,*.cc,*.h" - -[tool.docformatter] -recursive = true -wrap-summaries = 72 -wrap-descriptions = 72 - -[tool.black] -line-length = 79 -include = '\.pyi?$' -exclude = ''' -/( - \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | \.rst - | \.txt - | _build - | buck-out - | build - | dist - - # The following are specific to Black, you probably don't want those. - | blib2to3 - | tests/data -)/ -''' diff --git a/release.html b/release.html new file mode 100644 index 00000000..5aeb2e41 --- /dev/null +++ b/release.html @@ -0,0 +1,209 @@ + + + + + + + + + Release notes — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Release notes

+
+

1.6.0

+
+
+

1.5.2

+

Added:

+
    +
  • Add gsl to conda requirements.

  • +
+

Changed:

+
    +
  • Remove mac static GSL linking; always link to shared GSL.

  • +
  • Change doc to docs for skpkg standard.

  • +
+

Fixed:

+
    +
  • Fix misspelled words in source code comments.

  • +
  • Migrate documentation to scikit-package 0.1.0 standards, including a mock import for API rendering.

  • +
  • Add libsblas.dll to build pypi wheel in windows.

  • +
+
+
+

1.5.1

+

Fixed:

+
    +
  • Fixed SystemError and MemoryError for redirect_stdout on Windows with Python 3.13.

  • +
+

Removed:

+
    +
  • Removed restore_stdout function and wrapper.

  • +
+
+
+

1.5.0

+

Added:

+
    +
  • Python 3.11, 3.12 support

  • +
  • Option to skip printing of introductory information when initializing the PdfFit class.

  • +
  • Added additional runtime linker flags in CustomBuildExt.run to embed the RPATH flags for the built extensions.

  • +
  • Support for retrieving GSL configuration from CONDA_PREFIX/ GSL_PATH on all platforms.

  • +
  • Separate installation instruction for macOS (Arm64) in READEM

  • +
  • Added restore_stdout function and wrapper.

  • +
  • Added Python 3.13 support.

  • +
+

Changed:

+
    +
  • Changed setup.py to lazy evaluate gsl installation.

  • +
  • Documentation brought up to date

  • +
  • Merged the GSL configuration logic in setup.py.

  • +
  • Changed pytest capture_output fixture. Now automatically restores sys.stdout.

  • +
+

Fixed:

+
    +
  • remove older conda-recipe files

  • +
  • moved the tests directory from src to the root using conftest.py.

  • +
  • fixed a circular import bug during “ pip install .” in GitHub CI.

  • +
  • renamed .py files under tests to snake_case.

  • +
  • add PyPI packages under pip.txt

  • +
  • re-cookiecutter to group’s package standard

  • +
  • Fix missing __date__, use PyPI release date.

  • +
  • Fixed SystemError when running pytest on Windows with Python 3.13.

  • +
+

Removed:

+
    +
  • Python <= 3.10 support

  • +
  • Six dependency and py2 support

  • +
+
+
+

1.4.2

+

Added:

+
    +
  • Support for Python 3.11, 3.12

  • +
+

Changed:

+
    +
  • No notable functional changes from 1.4.1

  • +
+
+
+

1.4.4rc0

+

Fixed:

+
    +
  • Code linted to group flake8 standards

  • +
  • Package structure moved to diffpy standard structure

  • +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/requirements/build.txt b/requirements/build.txt deleted file mode 100644 index 23094c91..00000000 --- a/requirements/build.txt +++ /dev/null @@ -1,3 +0,0 @@ -python -setuptools -gsl diff --git a/requirements/conda.txt b/requirements/conda.txt deleted file mode 100644 index 0668b5ee..00000000 --- a/requirements/conda.txt +++ /dev/null @@ -1,2 +0,0 @@ -diffpy.structure -gsl diff --git a/requirements/docs.txt b/requirements/docs.txt deleted file mode 100644 index 1de813f9..00000000 --- a/requirements/docs.txt +++ /dev/null @@ -1,5 +0,0 @@ -sphinx -sphinx_rtd_theme -sphinx-copybutton -doctr -m2r2 diff --git a/requirements/pip.txt b/requirements/pip.txt deleted file mode 100644 index 9cc306b0..00000000 --- a/requirements/pip.txt +++ /dev/null @@ -1 +0,0 @@ -diffpy.structure diff --git a/requirements/tests.txt b/requirements/tests.txt deleted file mode 100644 index a7277865..00000000 --- a/requirements/tests.txt +++ /dev/null @@ -1,6 +0,0 @@ -flake8 -pytest -codecov -coverage -pytest-cov -pytest-env diff --git a/search.html b/search.html new file mode 100644 index 00000000..5fef8c16 --- /dev/null +++ b/search.html @@ -0,0 +1,125 @@ + + + + + + + + Search — diffpy.pdffit2 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 00000000..d1d3d1de --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles":{"1.4.2":[[4,"id5"]],"1.4.4rc0":[[4,"rc0"]],"1.5.0":[[4,"id4"]],"1.5.1":[[4,"id3"]],"1.5.2":[[4,"id2"]],"1.6.0":[[4,"id1"]],"Acknowledgements":[[2,"acknowledgements"]],"Authors":[[2,"authors"]],"Example 1: Calculate PDF of FCC nickel":[[1,"example-1-calculate-pdf-of-fcc-nickel"]],"Example 2: Performing simple refinement":[[1,"example-2-performing-simple-refinement"]],"Examples":[[1,null]],"Getting started":[[2,"getting-started"]],"Indices":[[2,"indices"]],"Installation":[[2,"installation"]],"License":[[3,null]],"Reference":[[2,"reference"]],"Release notes":[[4,null]],"Submodules":[[0,"submodules"]],"Table of contents":[[2,"table-of-contents"]],"diffpy.pdffit2 documentation":[[2,null]],"diffpy.pdffit2 package":[[0,null]],"diffpy.pdffit2.ipy_ext module":[[0,"diffpy-pdffit2-ipy-ext-module"]],"diffpy.pdffit2.output module":[[0,"module-diffpy.pdffit2.output"]],"diffpy.pdffit2.pdffit module":[[0,"module-diffpy.pdffit2.pdffit"]]},"docnames":["api/diffpy.pdffit2","examples","index","license","release"],"envversion":{"sphinx":66,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1},"filenames":["api/diffpy.pdffit2.rst","examples.rst","index.rst","license.rst","release.rst"],"indexentries":{"add_structure() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.add_structure",false]],"alloc() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.alloc",false]],"bang() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.bang",false]],"blen() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.blen",false]],"bond_angle() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.bond_angle",false]],"bond_length_atoms() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.bond_length_atoms",false]],"bond_length_types() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.bond_length_types",false]],"calc() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.calc",false]],"constrain() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.constrain",false]],"data_files (diffpy.pdffit2.pdffit.pdffit attribute)":[[0,"diffpy.pdffit2.pdffit.PdfFit.data_files",false]],"delta1() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.delta1",false]],"delta2() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.delta2",false]],"diffpy.pdffit2.output":[[0,"module-diffpy.pdffit2.output",false]],"diffpy.pdffit2.pdffit":[[0,"module-diffpy.pdffit2.pdffit",false]],"dscale() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.dscale",false]],"fcon (diffpy.pdffit2.pdffit.pdffit attribute)":[[0,"diffpy.pdffit2.pdffit.PdfFit.FCON",false]],"fixpar() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.fixpar",false]],"freepar() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.freepar",false]],"get_atom_types() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.get_atom_types",false]],"get_atoms() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.get_atoms",false]],"get_scat() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.get_scat",false]],"get_scat_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.get_scat_string",false]],"get_structure() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.get_structure",false]],"getcrw() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getcrw",false]],"getpar() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getpar",false]],"getpdf_diff() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getpdf_diff",false]],"getpdf_fit() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getpdf_fit",false]],"getpdf_obs() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getpdf_obs",false]],"getr() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getR",false]],"getrw() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getrw",false]],"getvar() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.getvar",false]],"intro() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.intro",false]],"lat() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.lat",false]],"license":[[3,"index-0",false]],"module":[[0,"module-diffpy.pdffit2.output",false],[0,"module-diffpy.pdffit2.pdffit",false]],"num_atoms() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.num_atoms",false]],"num_datasets() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.num_datasets",false]],"num_phases() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.num_phases",false]],"occ() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.occ",false]],"pdesel() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.pdesel",false]],"pdffit (class in diffpy.pdffit2.pdffit)":[[0,"diffpy.pdffit2.pdffit.PdfFit",false]],"pdfrange() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.pdfrange",false]],"phase_fractions() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.phase_fractions",false]],"pscale() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.pscale",false]],"psel() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.psel",false]],"qbroad() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.qbroad",false]],"qdamp() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.qdamp",false]],"rcut() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.rcut",false]],"read_data() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.read_data",false]],"read_data_lists() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.read_data_lists",false]],"read_data_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.read_data_string",false]],"read_struct() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.read_struct",false]],"read_struct_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.read_struct_string",false]],"redirect_stdout() (in module diffpy.pdffit2.output)":[[0,"diffpy.pdffit2.output.redirect_stdout",false]],"refine() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.refine",false]],"refine_step() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.refine_step",false]],"release notes":[[4,"index-0",false]],"reset() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.reset",false]],"reset_scat() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.reset_scat",false]],"save_dif() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_dif",false]],"save_dif_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_dif_string",false]],"save_pdf() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_pdf",false]],"save_pdf_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_pdf_string",false]],"save_res() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_res",false]],"save_res_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_res_string",false]],"save_struct() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_struct",false]],"save_struct_string() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.save_struct_string",false]],"sctp (diffpy.pdffit2.pdffit.pdffit attribute)":[[0,"diffpy.pdffit2.pdffit.PdfFit.Sctp",false]],"selalias (diffpy.pdffit2.pdffit.pdffit attribute)":[[0,"diffpy.pdffit2.pdffit.PdfFit.selalias",false]],"selectall() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.selectAll",false]],"selectatomindex() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.selectAtomIndex",false]],"selectatomtype() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.selectAtomType",false]],"selectnone() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.selectNone",false]],"set_scat() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.set_scat",false]],"setdata() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.setdata",false]],"setpar() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.setpar",false]],"setphase() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.setphase",false]],"setvar() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.setvar",false]],"show_scat() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.show_scat",false]],"show_struct() (diffpy.pdffit2.pdffit.pdffit method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.show_struct",false]],"spdiameter() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.spdiameter",false]],"sratio() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.sratio",false]],"stepcut() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.stepcut",false]],"stru_files (diffpy.pdffit2.pdffit.pdffit attribute)":[[0,"diffpy.pdffit2.pdffit.PdfFit.stru_files",false]],"u11() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.u11",false]],"u12() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.u12",false]],"u13() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.u13",false]],"u22() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.u22",false]],"u23() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.u23",false]],"u33() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.u33",false]],"x() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.x",false]],"y() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.y",false]],"z() (diffpy.pdffit2.pdffit.pdffit static method)":[[0,"diffpy.pdffit2.pdffit.PdfFit.z",false]]},"objects":{"diffpy.pdffit2":[[0,0,0,"-","output"],[0,0,0,"-","pdffit"]],"diffpy.pdffit2.output":[[0,1,1,"","redirect_stdout"]],"diffpy.pdffit2.pdffit":[[0,2,1,"","PdfFit"]],"diffpy.pdffit2.pdffit.PdfFit":[[0,3,1,"","FCON"],[0,3,1,"","Sctp"],[0,4,1,"","add_structure"],[0,4,1,"","alloc"],[0,4,1,"","bang"],[0,4,1,"","blen"],[0,4,1,"","bond_angle"],[0,4,1,"","bond_length_atoms"],[0,4,1,"","bond_length_types"],[0,4,1,"","calc"],[0,4,1,"","constrain"],[0,3,1,"","data_files"],[0,4,1,"","delta1"],[0,4,1,"","delta2"],[0,4,1,"","dscale"],[0,4,1,"","fixpar"],[0,4,1,"","freepar"],[0,4,1,"","getR"],[0,4,1,"","get_atom_types"],[0,4,1,"","get_atoms"],[0,4,1,"","get_scat"],[0,4,1,"","get_scat_string"],[0,4,1,"","get_structure"],[0,4,1,"","getcrw"],[0,4,1,"","getpar"],[0,4,1,"","getpdf_diff"],[0,4,1,"","getpdf_fit"],[0,4,1,"","getpdf_obs"],[0,4,1,"","getrw"],[0,4,1,"","getvar"],[0,4,1,"","intro"],[0,4,1,"","lat"],[0,4,1,"","num_atoms"],[0,4,1,"","num_datasets"],[0,4,1,"","num_phases"],[0,4,1,"","occ"],[0,4,1,"","pdesel"],[0,4,1,"","pdfrange"],[0,4,1,"","phase_fractions"],[0,4,1,"","pscale"],[0,4,1,"","psel"],[0,4,1,"","qbroad"],[0,4,1,"","qdamp"],[0,4,1,"","rcut"],[0,4,1,"","read_data"],[0,4,1,"","read_data_lists"],[0,4,1,"","read_data_string"],[0,4,1,"","read_struct"],[0,4,1,"","read_struct_string"],[0,4,1,"","refine"],[0,4,1,"","refine_step"],[0,4,1,"","reset"],[0,4,1,"","reset_scat"],[0,4,1,"","save_dif"],[0,4,1,"","save_dif_string"],[0,4,1,"","save_pdf"],[0,4,1,"","save_pdf_string"],[0,4,1,"","save_res"],[0,4,1,"","save_res_string"],[0,4,1,"","save_struct"],[0,4,1,"","save_struct_string"],[0,3,1,"","selalias"],[0,4,1,"","selectAll"],[0,4,1,"","selectAtomIndex"],[0,4,1,"","selectAtomType"],[0,4,1,"","selectNone"],[0,4,1,"","set_scat"],[0,4,1,"","setdata"],[0,4,1,"","setpar"],[0,4,1,"","setphase"],[0,4,1,"","setvar"],[0,4,1,"","show_scat"],[0,4,1,"","show_struct"],[0,4,1,"","spdiameter"],[0,4,1,"","sratio"],[0,4,1,"","stepcut"],[0,3,1,"","stru_files"],[0,4,1,"","u11"],[0,4,1,"","u12"],[0,4,1,"","u13"],[0,4,1,"","u22"],[0,4,1,"","u23"],[0,4,1,"","u33"],[0,4,1,"","x"],[0,4,1,"","y"],[0,4,1,"","z"]]},"objnames":{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","attribute","Python attribute"],"4":["py","method","Python method"]},"objtypes":{"0":"py:module","1":"py:function","2":"py:class","3":"py:attribute","4":"py:method"},"terms":{"1e":0,"4rc0":2,"A":[0,1,3],"ALL":0,"AND":3,"ARE":3,"AS":3,"All":[0,2],"BE":3,"BUT":3,"BY":3,"FOR":3,"For":[1,2,3],"IF":3,"IN":3,"IS":3,"If":[0,2,3],"In":2,"It":2,"NO":3,"NOT":3,"No":[0,4],"OF":3,"ON":3,"OR":3,"OUT":3,"SUCH":3,"THE":3,"THIS":3,"TO":3,"The":[0,1,2],"Then":1,"This":[0,1,2,3],"To":2,"We":1,"When":0,"__date__":4,"a1":0,"a2":0,"abov":3,"access":0,"accommod":0,"acknowledg":3,"activ":0,"add":[0,4],"add_structur":0,"addit":4,"advanc":2,"advis":3,"afterward":0,"aidx":0,"alloc":[0,1],"alpha":0,"also":[0,1,2],"although":2,"alway":4,"amorph":0,"angl":0,"angle_error":0,"ani":3,"anisotrop":0,"anoth":0,"api":[2,4],"appli":[0,2],"approxim":0,"arg":0,"aris":3,"arm64":4,"array":1,"ask":[2,3],"assign":[0,1],"atom":[0,1,2],"automat":4,"avail":3,"b":[0,1],"bad":0,"bang":0,"base":0,"befor":0,"beta":0,"billing":[2,3],"bin":0,"binari":3,"blen":0,"bloch":[2,3],"board":3,"bond":0,"bond_angl":0,"bond_length_atom":0,"bond_length_typ":0,"bool":0,"bound":0,"boundari":0,"bo\u017ein":[2,3],"bring":0,"broaden":0,"brought":4,"bryndin":[2,3],"bug":[2,4],"build":4,"built":[2,4],"busi":3,"c":[0,1,2,3],"calc":[0,1],"calcul":[0,2],"calculationerror":0,"call":0,"can":[0,1,2],"capture_output":4,"care":0,"carri":[1,2],"case":0,"caus":3,"cell":0,"cgr":1,"chang":[0,4],"chris":2,"ci":4,"circular":4,"cite":[2,3],"citi":3,"cl":0,"class":[0,1,4],"clear":0,"close":1,"cmi":2,"code":[2,3,4],"columbia":[2,3],"com":2,"command":1,"comment":4,"common":2,"comput":[2,3],"conda":4,"conda_prefix":4,"conden":[2,3],"condit":[0,3],"configur":[0,1,4],"conftest":4,"consequenti":3,"consid":0,"constant":0,"constrain":[0,1],"constraint":0,"constrainterror":0,"contain":0,"content":0,"contract":3,"contribut":2,"contributor":[2,3],"control":0,"conveni":2,"convert":[0,2],"cookiecutt":4,"copi":0,"copyright":3,"correct":[0,1],"correl":[0,1],"correspond":1,"cost":0,"count":0,"creat":[0,1,2],"create_intro":0,"crw":0,"crystal":[2,3],"cumul":0,"current":[0,1,2],"curv":1,"custom":0,"custombuildext":4,"cutoff":[0,1],"d":[2,3],"damag":3,"damp":[0,1],"dans":3,"data":[0,1,2,3],"data_fil":0,"dataset":0,"date":4,"day":2,"ddij":0,"deby":0,"decay":1,"default":0,"defin":0,"degre":0,"delta1":0,"delta2":[0,1],"depart":2,"depend":[0,4],"deriv":[2,3],"detail":2,"determin":0,"deviat":0,"dgr_data":0,"diamet":0,"dictionari":0,"differ":[0,1],"diffpi":[1,3,4],"diffract":2,"dij":0,"direct":[2,3],"directori":[1,4],"disclaim":3,"discus":1,"disk":0,"display":[0,1],"distanc":0,"distance_error":0,"distribut":[2,3],"dll":4,"doc":4,"document":[1,3,4],"doe":0,"done":[0,2],"download":1,"dscale":0,"dst":0,"due":[0,1],"dure":4,"e":[0,2,3],"ed":2,"edu":3,"effect":1,"either":0,"element":0,"email":3,"emb":4,"empir":0,"empti":0,"enabl":2,"endors":3,"engin":[0,2],"envelop":0,"equal":[0,1],"equat":0,"equidist":0,"error":0,"evalu":[0,4],"even":3,"event":3,"exampl":[0,2],"exclud":0,"exclus":0,"exemplari":3,"exist":0,"experiment":1,"express":3,"ext":2,"extend":2,"extens":[2,4],"extra":2,"f":[1,2],"factor":[0,1],"fail":0,"fair":2,"fals":0,"farrow":[2,3],"fcc":2,"fcomp":0,"fcon":0,"fgr":1,"file":[0,1,2,3,4],"final":1,"find":0,"finish":0,"first":[0,1,2],"fit":[0,1,3],"fix":[0,4],"fixpar":0,"fixtur":4,"flag":[0,4],"flake8":4,"float":0,"fname":0,"focus":0,"follow":[0,2,3],"form":[0,3],"format":1,"formula":1,"fortran":2,"fraction":0,"free":0,"freed":0,"freepar":0,"fsqr":0,"full":2,"function":[0,2,4],"g":[0,1],"gamma":0,"gdiff":1,"gdiff_baselin":1,"get":0,"get_atom":0,"get_atom_typ":0,"get_scat":0,"get_scat_str":0,"get_structur":0,"getcrw":0,"getpar":0,"getpdf_diff":0,"getpdf_fit":[0,1],"getpdf_ob":[0,1],"getr":[0,1],"getrw":0,"getvar":[0,1],"gfit":1,"github":[2,4],"given":0,"glare":2,"gob":1,"good":3,"gr":1,"gr_data":0,"graph":2,"grid":1,"group":[2,4],"gsl":4,"gsl_path":4,"guid":1,"hack":2,"handl":0,"help":1,"holder":3,"howev":[2,3],"http":3,"https":[2,3],"ident":0,"idx":1,"ij0":0,"ij1":0,"ijchar":0,"implement":2,"impli":3,"import":[0,1,4],"incident":3,"includ":[0,2,3,4],"index":[0,2],"indic":[0,3],"indirect":3,"inform":[1,3,4],"initi":[0,1,4],"input":0,"insensit":0,"instal":4,"instanc":0,"instruct":4,"instrument":[0,1],"int":0,"integ":0,"interact":2,"interrupt":3,"intro":0,"introductori":[0,4],"invalid":0,"investig":2,"ioerror":0,"iop":[2,3],"ip":0,"ipy_ext":2,"ipython":2,"iset":0,"isotrop":1,"j":[0,2,3],"jacqu":2,"ji":0,"jk":0,"juha":2,"juh\u00e1":[2,3],"jupyt":2,"k":0,"keep":0,"key":0,"knowledg":2,"known":0,"ko":1,"l":[2,3],"label":0,"laid":3,"last":[1,2],"lat":[0,1],"lattic":[0,1],"lazi":4,"lb":0,"lead":[2,3],"left":1,"length":0,"less":2,"liabil":3,"liabl":3,"libsbla":4,"licens":2,"like":0,"limit":3,"link":4,"linker":4,"lint":4,"list":[0,1,2,3],"liu":[2,3],"load":[0,1],"local":[0,2],"locat":2,"logic":4,"loss":[0,3],"lower":0,"m":2,"mac":4,"maco":4,"made":2,"mailto":3,"maintain":2,"make":1,"malform":0,"march":2,"mark":0,"mass":0,"materi":3,"mathemat":2,"matplotlib":1,"matter":[2,3],"maximum":[0,1],"may":[0,3],"member":2,"memori":0,"memoryerror":4,"merchant":3,"merg":4,"messag":0,"met":3,"method":0,"michigan":3,"migrat":4,"mimic":2,"minimum":[0,1],"miss":4,"misspel":4,"mock":4,"model":[0,2],"modif":3,"modul":[1,2],"motion":1,"move":4,"must":[0,1,3],"n":0,"na":0,"name":[0,3],"nanostructur":[2,3],"need":[1,2],"neglect":0,"neglig":3,"neither":3,"neutron":0,"never":0,"new":[0,1,2,3],"ni":1,"ni_calcul":1,"ni_refin":1,"nickel":2,"none":0,"normal":0,"notabl":4,"note":2,"notebook":2,"notic":3,"now":4,"npts":1,"num_atom":0,"num_dataset":0,"num_phas":0,"number":[0,1],"numer":0,"numpi":1,"object":[0,1],"observ":0,"obtain":[0,1],"occ":0,"occup":0,"occur":0,"offer":1,"old":2,"older":4,"onli":[0,2],"open":3,"option":[0,4],"order":0,"org":[2,3],"origin":2,"otherwis":3,"output":1,"p":[0,1,2,3],"packag":[1,2,4],"page":[2,3],"pair":[0,2],"paper":[2,3],"par":0,"paramet":[0,1],"part":[2,3],"partial":0,"particl":0,"particular":3,"pass":[0,1],"path":1,"pavol":2,"pdesel":0,"pdf":[0,2],"pdffit":[1,2,4],"pdffit2":[1,3],"pdfgui":[1,2,3],"pdfrang":[0,1],"peak":0,"perform":2,"period":0,"permiss":3,"permit":3,"pf":1,"phase":[0,1],"phase_fract":0,"phenomenolog":0,"phys":[2,3],"physic":2,"pip":4,"platform":4,"pleas":[1,3],"plenum":2,"plot":[1,2],"plt":1,"point":[0,1],"possibl":[2,3],"prefer":2,"previous":2,"print":[0,4],"prior":3,"procur":3,"product":3,"prof":3,"proffen":[2,3],"profil":2,"profit":3,"program":[2,3],"project":[2,3],"promot":3,"properti":0,"provid":[2,3],"pscale":[0,1],"psel":0,"public":[2,3],"purg":2,"purpos":3,"py":4,"py2":4,"pylab":2,"pypi":4,"pyplot":1,"pytest":4,"python":[2,4],"q":[0,1],"qbroad":0,"qdamp":[0,1],"qmax":[0,1],"quadrat":0,"r":[0,1],"r_data":0,"radiation_typ":1,"radius":0,"rais":0,"rang":[0,1],"ratio":0,"ray":1,"rcut":0,"re":4,"read":[0,1],"read_data":[0,1],"read_data_list":0,"read_data_str":0,"read_struct":[0,1],"read_struct_str":0,"readem":4,"readm":2,"real":2,"recent":2,"recip":4,"recommend":2,"redirect":0,"redirect_stdout":[0,4],"redistribut":3,"reduct":0,"refer":[0,1],"refin":[0,2],"refine_step":0,"reflect":0,"relat":[0,1],"releas":2,"reliabl":2,"remov":4,"renam":4,"render":4,"repres":0,"reproduc":3,"requir":4,"res":1,"research":[2,3],"reset":0,"reset_scat":0,"resid":1,"resolut":[0,1],"respect":0,"respons":1,"restor":4,"restore_stdout":4,"result":[0,1],"retain":3,"retriev":[0,4],"return":0,"rietveld":2,"right":1,"rippl":0,"rmax":[0,1],"rmin":[0,1],"root":4,"rpath":4,"rstr":1,"run":[0,1,4],"runtim":4,"rw":0,"s":[0,2,3,4],"save":[0,1],"save_dif":0,"save_dif_str":0,"save_pdf":[0,1],"save_pdf_str":0,"save_r":[0,1],"save_res_str":0,"save_struct":[0,1],"save_struct_str":0,"sb2896":3,"scale":[0,1],"scatter":0,"scientif":[2,3],"scikit":[2,4],"script":[1,2],"sctp":0,"search":2,"second":[0,1],"see":[0,2],"selalia":0,"select":0,"selectal":0,"selectatomindex":0,"selectatomtyp":0,"selectnon":0,"send":0,"separ":4,"servic":3,"set":[0,1],"set_scat":0,"setdata":0,"setpar":[0,1],"setphas":0,"setup":4,"setvar":0,"sever":1,"shall":3,"share":4,"sharpen":[0,1],"shell":2,"shortest":0,"show":[0,1],"show_scat":0,"show_struct":0,"side":1,"sigma":0,"signific":2,"simon":[2,3],"simpl":2,"simul":1,"singl":0,"six":4,"skip":4,"skpkg":4,"snake_cas":4,"softwar":[2,3],"sort":0,"sourc":[0,2,3,4],"space":[0,2],"spdiamet":0,"speci":0,"special":3,"specif":[0,3],"specifi":[0,1],"spheric":0,"sratio":0,"src":4,"stack":[2,3],"standard":[0,2,4],"start":0,"state":3,"statement":2,"static":[0,4],"stdatom":0,"stdcell":0,"stdmass":0,"stdout":[0,4],"step":0,"stepcut":0,"store":0,"str":0,"strict":3,"string":0,"stru":[0,1],"stru_fil":0,"struct":0,"structur":[0,1,2,4],"structureerror":0,"studi":[2,3],"stype":0,"subject":3,"submodul":2,"substitut":3,"suitabl":2,"sum":0,"support":4,"sure":1,"switch":0,"symbol":0,"syntax":0,"sys":4,"systemerror":4,"tag":0,"take":0,"team":2,"temperatur":1,"tensor":0,"term":3,"termin":0,"test":4,"text":1,"th":[2,3],"theori":[0,3],"thermal":0,"thoma":2,"thorp":2,"titl":1,"toler":0,"tort":3,"total":0,"tri":2,"true":0,"truste":3,"tupl":0,"txt":4,"type":0,"u":0,"u11":[0,1],"u12":0,"u13":0,"u22":[0,1],"u23":0,"u33":[0,1],"ub":0,"unassigederror":0,"unassignederror":0,"uncertainti":0,"unclear":0,"undefin":0,"uniqu":0,"unit":0,"universiti":[2,3],"unknown":0,"updat":2,"upper":0,"usag":0,"use":[0,1,2,3,4],"user":0,"util":1,"val":0,"valu":[0,1],"valueerror":0,"var":0,"variabl":[0,1],"version":2,"visit":3,"w":[2,3],"waller":0,"warranti":3,"way":3,"web":3,"weight":0,"welcom":[1,2],"wenduo":2,"wheel":4,"whether":3,"will":0,"window":[1,4],"within":[0,2],"without":3,"word":4,"wrapper":4,"write":2,"written":[2,3],"www":3,"x":[0,1],"xlabel":1,"xray":[0,1],"y":0,"yet":0,"ylabel":1,"york":[2,3],"z":0,"zhou":2,"\u00e5":1},"titles":["diffpy.pdffit2 package","Examples","diffpy.pdffit2 documentation","License","Release notes"],"titleterms":{"4rc0":4,"acknowledg":2,"author":2,"calcul":1,"content":2,"diffpi":[0,2],"document":2,"exampl":1,"fcc":1,"get":2,"indic":2,"instal":2,"ipy_ext":0,"licens":3,"modul":0,"nickel":1,"note":4,"output":0,"packag":0,"pdf":1,"pdffit":0,"pdffit2":[0,2],"perform":1,"refer":2,"refin":1,"releas":4,"simpl":1,"start":2,"submodul":0,"tabl":2}}) \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index a263a64e..00000000 --- a/setup.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env python - -# Extensions script for diffpy.pdffit2 -"""PDFfit2 - real space structure refinement engine - -Packages: diffpy.pdffit2 -Scripts: pdffit2 -""" - -import glob -import os -import re -import shutil -import sys -import warnings -from pathlib import Path - -from setuptools import Extension, setup -from setuptools.command.build_ext import build_ext - -# Use this version when git data are not available, like in git zip archive. -# Update when tagging a new release. -FALLBACK_VERSION = "1.5.1" - -MYDIR = str(Path(__file__).parent.resolve()) - -# Helper functions ----------------------------------------------------------- - - -def get_compiler_type(): - """Return the compiler type used during the build.""" - cc_arg = [a for a in sys.argv if a.startswith("--compiler=")] - if cc_arg: - return cc_arg[-1].split("=", 1)[1] - from distutils.ccompiler import new_compiler - - return new_compiler().compiler_type - - -def get_gsl_config(): - """ - Determine the GSL include and library directories by trying in order: - 1) CONDA_PREFIX, - 2) GSL_PATH, - 3) gsl-config (for Unix-like systems). - Raises EnvironmentError if none are found. - """ - rv = {"include_dirs": [], "library_dirs": []} - - # 1. Check using CONDA_PREFIX. - conda_prefix = os.environ.get("CONDA_PREFIX", "") - if conda_prefix: - if os.name == "nt": - inc = Path(conda_prefix) / "Library" / "include" - lib = Path(conda_prefix) / "Library" / "lib" - else: - inc = Path(conda_prefix) / "include" - lib = Path(conda_prefix) / "lib" - if inc.is_dir() and lib.is_dir(): - rv["include_dirs"].append(str(inc)) - rv["library_dirs"].append(str(lib)) - return rv - else: - warnings.warn( - f"CONDA_PREFIX is set to {conda_prefix}, " - "but GSL not found at those paths. Proceeding..." - ) - - # 2. Check using GSL_PATH. - gsl_path = os.environ.get("GSL_PATH", "") - if gsl_path: - inc = Path(gsl_path) / "include" - lib = Path(gsl_path) / "lib" - if inc.is_dir() and lib.is_dir(): - rv["include_dirs"].append(str(inc)) - rv["library_dirs"].append(str(lib)) - return rv - else: - raise EnvironmentError( - f"GSL_PATH={gsl_path} is set, but {inc} or {lib} not found. " - "Please verify your GSL_PATH." - ) - - # 3. Try using the gsl-config executable (only on Unix-like systems). - if os.name != "nt": - path_dirs = os.environ.get("PATH", "").split(os.pathsep) - gslcfg_paths = [Path(p) / "gsl-config" for p in path_dirs if p] - gslcfg_paths = [p for p in gslcfg_paths if p.is_file()] - if gslcfg_paths: - gslcfg = gslcfg_paths[0] - txt = gslcfg.read_text() - prefix_match = re.search(r"(?m)^prefix=(.+)", txt) - include_match = re.search(r"(?m)^[^#]*\s-I(\S+)", txt) - lib_match = re.search(r"(?m)^[^#]*\s-L(\S+)", txt) - if prefix_match: - prefix_path = Path(prefix_match.group(1)) - inc_dir = ( - include_match.group(1) - if include_match - else (prefix_path / "include") - ) - lib_dir = ( - lib_match.group(1) if lib_match else (prefix_path / "lib") - ) - rv["include_dirs"].append(str(inc_dir)) - rv["library_dirs"].append(str(lib_dir)) - return rv - else: - raise RuntimeError(f"Cannot parse 'prefix=' from {gslcfg}.") - else: - warnings.warn( - "No gsl-config found in PATH. GSL may not be installed or not in PATH. " - "Proceeding without GSL configuration." - ) - - # 4. Nothing found: raise error. - raise EnvironmentError( - "Unable to locate GSL:\n" - "1) CONDA_PREFIX not set or no GSL there\n" - "2) GSL_PATH not set or invalid\n" - "3) gsl-config not available\n" - "Please set GSL_PATH or use a conda environment with GSL." - ) - - -class CustomBuildExt(build_ext): - def run(self): - # Retrieve the GSL library directories and append them to each extension. - gsl_cfg = get_gsl_config() - lib_dirs = gsl_cfg.get("library_dirs", []) - for ext in self.extensions: - # Add gsl lib for linking. - ext.library_dirs.extend(lib_dirs) - # Embed RPATH flags, runtime linking without LD_LIBRARY_PATH. - ext.extra_link_args = ext.extra_link_args or [] - for lib in lib_dirs: - ext.extra_link_args.append(f"-Wl,-rpath,{lib}") - super().run() - # Avoid dll error - gsl_path = ( - Path(os.environ.get("GSL_PATH")) - if os.environ.get("GSL_PATH") - else Path(os.environ.get("CONDA_PREFIX", "")) / "Library" - ) - bin_path = gsl_path / "bin" - dest_path = Path(self.build_lib) / "diffpy" / "pdffit2" - dest_path.mkdir(parents=True, exist_ok=True) - for dll_file in bin_path.glob("gsl*.dll"): - shutil.copy(str(dll_file), str(dest_path)) - - -def create_extensions(): - """Create the list of Extension objects for the build.""" - # lazy evaluation prevents build sdist failure - try: - gcfg = get_gsl_config() - except EnvironmentError: - return [] - - libraries = ["gsl"] - - include_dirs = [MYDIR] + gcfg["include_dirs"] - library_dirs = gcfg["library_dirs"] - define_macros = [] - extra_objects = [] - extra_compile_args = [] - extra_link_args = [] - - compiler_type = get_compiler_type() - if compiler_type in ("unix", "cygwin", "mingw32"): - extra_compile_args = [ - "-std=c++11", - "-Wall", - "-Wno-write-strings", - "-O3", - "-funroll-loops", - "-ffast-math", - ] - elif compiler_type == "msvc": - define_macros += [("_USE_MATH_DEFINES", None)] - extra_compile_args = ["/EHs"] - - # Extension keyword arguments. - ext_kws = { - "include_dirs": include_dirs, - "libraries": libraries, - "library_dirs": library_dirs, - "define_macros": define_macros, - "extra_compile_args": extra_compile_args, - "extra_link_args": extra_link_args, - "extra_objects": extra_objects, - } - ext = Extension( - "diffpy.pdffit2.pdffit2", - glob.glob("src/extensions/**/*.cc"), - **ext_kws, - ) - return [ext] - - -# Extensions not included in pyproject.toml - -if sys.platform.startswith("win"): - setup_args = dict( - ext_modules=[], - cmdclass={"build_ext": CustomBuildExt}, - package_data={"diffpy.pdffit2": ["libcblas.dll"]}, - ) -else: - setup_args = dict( - ext_modules=[], - cmdclass={"build_ext": CustomBuildExt}, - ) - - -if __name__ == "__main__": - setup_args["ext_modules"] = create_extensions() - setup(**setup_args) diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py deleted file mode 100644 index 0f59515b..00000000 --- a/src/diffpy/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# (c) 2025-2026 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## diff --git a/src/diffpy/pdffit2/__init__.py b/src/diffpy/pdffit2/__init__.py deleted file mode 100644 index 07339c9e..00000000 --- a/src/diffpy/pdffit2/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# (c) 2025-2026 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## -"""PDFfit2 - real space structure refinement program.""" - -# WARNING: Do NOT remove the isort: off/on comments in this file. -# These tags are used to prevent isort from reordering imports in this file. -# __version__ must be initialized before importing C++ extensions. - -# isort: off -# Import the package version before C++ extensions are loaded. -from diffpy.pdffit2.output import redirect_stdout -from diffpy.pdffit2.version import __date__, __version__ - -# Import C++ related modules since the __version__ attribute is used. -from diffpy.pdffit2.pdffit import PdfFit -from diffpy.pdffit2.pdffit2 import is_element - -# isort: on - -# Ensure all necessary components are imported and initialized -assert __version__ or True -assert __date__ or True -assert all((PdfFit, redirect_stdout, is_element)) - -# End of file diff --git a/src/diffpy/pdffit2/ipy_ext.py b/src/diffpy/pdffit2/ipy_ext.py deleted file mode 100644 index c21f00d9..00000000 --- a/src/diffpy/pdffit2/ipy_ext.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python - -"""This module defines functions within IPython session to simulate the -old pdffit2 interactive session. - -Usage: %load_ext diffpy.pdffit2.ipy_ext -""" - - -def load_ipython_extension(ipython): - from diffpy.pdffit2 import PdfFit - - pf = PdfFit() - pdf = EasyPDFPlotting(pf) - print(" Type help(pdffit) or help(topic) for information.\n") - ns = dict(pdffit=PdfFit, pdf=pdf) - pf._exportAll(ns) - ipython.user_ns.update(ns) - return - - -class EasyPDFPlotting(object): - """Convenience functions for accessing and plotting PDFfit2 data.""" - - def __init__(self, pdffit_instance): - self._pdffit = pdffit_instance - return - - @property - def r(self): - "R-grid for PDF simulation." - return self._asarray(self._pdffit.getR(), dtype=float) - - @property - def Gobs(self): - "Observed PDF data." - return self._asarray(self._pdffit.getpdf_obs(), dtype=float) - - @property - def Gcalc(self): - "Calculated PDF data." - return self._asarray(self._pdffit.getpdf_fit()) - - @property - def Gdiff(self): - "Difference between the observed and simulated PDF." - return self.Gobs - self.Gcalc - - def showfit(self, offset=None): - """Plot observed and simulated PDFs and the difference curve. - - offset -- offset for the difference curve. - - No return value. - """ - from math import floor - - from matplotlib.pyplot import gca - - cr = self.r - cGobs = self.Gobs - cGcalc = self.Gcalc - cGdiff = self.Gdiff - if offset is None: - offset = floor(min([min(cGobs), min(cGcalc)]) - max(cGdiff)) - ax = gca() - ax.plot(cr, cGobs, "r.", cr, cGcalc, "b-", cr, cGdiff + offset, "g-") - xl = ax.xaxis.get_label().get_text() - yl = ax.yaxis.get_label().get_text() - if xl == "": - ax.set_xlabel("r (A)") - if yl == "": - ax.set_ylabel("G (A**-2)") - return - - def showRw(self): - "Plot cumulative Rw." - from matplotlib.pyplot import gca - - cRw = self._asarray(self._pdffit.getcrw()) - ax = gca() - ax.plot(self.r, cRw) - ax.set_title("Cumulative Rw = %.4f" % cRw[-1]) - ax.set_xlabel("r") - ax.set_ylabel("Rw") - return - - @staticmethod - def _asarray(x, dtype=None): - import numpy - - return numpy.asarray(x, dtype=dtype) - - -# End of class EasyPDFPlotting diff --git a/src/diffpy/pdffit2/libcblas.dll b/src/diffpy/pdffit2/libcblas.dll deleted file mode 100644 index 66a20b90..00000000 Binary files a/src/diffpy/pdffit2/libcblas.dll and /dev/null differ diff --git a/src/diffpy/pdffit2/output.py b/src/diffpy/pdffit2/output.py deleted file mode 100644 index f24c28e9..00000000 --- a/src/diffpy/pdffit2/output.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## -"""Take care of sending engine output to given file-like object. - -The output file is stored in local module variable stdout. -""" - - -# create module variable stdout - -from sys import stdout as stdout - -# silence pyflakes checker -assert stdout - - -def redirect_stdout(dst): - """Redirect PDFfit2 standard output to a file-like object dst. - - The dst value is stored in module variable stdout. - """ - from diffpy.pdffit2.pdffit2 import redirect_stdout - - redirect_stdout(dst) - global stdout - stdout = dst - return - - -# End of file diff --git a/src/diffpy/pdffit2/pdffit.py b/src/diffpy/pdffit2/pdffit.py deleted file mode 100644 index 38ddde5d..00000000 --- a/src/diffpy/pdffit2/pdffit.py +++ /dev/null @@ -1,1355 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farros, Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## -"""PdfFit class for fitting a structural model to PDF data.""" - -from __future__ import print_function - -import itertools -import numbers - -# Load pdffit2 and output modules to the current namespace. -# Note that "import diffpy.pdffit2.output as output" would -# crash with AttributeError when executed during imports of -# parent packages. -from diffpy.pdffit2 import output, pdffit2 - -# helper routines - - -def _format_value_std(value, stdev): - """Convert value to a string with standard deviation in brackets. - - value -- a number - stdev -- standard deviation. Ignored when small compared to value. - - Return string. - """ - if stdev > abs(value) * 1e-8: - s = "%g (%g)" % (value, stdev) - elif str(stdev) == "nan": - s = "%g (NaN)" % value - else: - s = "%g" % value - return s - - -def _format_bond_length(dij, ddij, ij1, symij): - """Return string with formatted bond length info for a pair of - atoms. - - dij -- distance between atoms i and j - ddij -- standard deviation of dij. Ignored when small relative to dij. - ij1 -- tuple of atom indices starting at 1 - symij -- tuple of atom symbols - - Return formatted string. - """ - w_smbidx = 10 - w_equals = 30 - s0 = "%s (#%i)" % (symij[0], ij1[0]) - s1 = "%s (#%i)" % (symij[1], ij1[1]) - leader0 = " " + s0.ljust(w_smbidx) + " - " + s1 + " " - leader1 = leader0.ljust(w_equals) + "= " - s = leader1 + _format_value_std(dij, ddij) + " A" - return s - - -def _convertCallable(var): - """Convert an object to the result of its call when callable. - - var -- string or callable object that returns string - - Return var or var(). - """ - if callable(var): - rv = var() - else: - rv = var - return rv - - -# constants - -__intro_message__ = """ -****************************************************************************** -* P D F F I T Version %(version)s * -* %(date)s * -* -------------------------------------------------------------------------- * -* (c) 1998-2007 Trustees of the Michigan State University. * -* (c) 2008-%(year)s Trustees of the Columbia University * -* in the city of New York. * -* * -* Authors: * -* Thomas Proffen - Email: tproffen@lanl.gov * -* Jacques Bloch - Email: bloch@pa.msu.edu * -* Christopher Farrow - Email: clf2121@columbia.edu * -* Pavol Juhas - Email: pjuhas@bnl.gov * -* Simon Billinge - Email: sb2896@columbia.edu * -****************************************************************************** -""" - - -############################################################################## - - -class PdfFit(object): - """Class for handling PdfFit calculations and refinements. - - Attributes - ---------- - stru_files : list - The list to store structure files. - data_files : list - The list to store data files. - """ - - # constants and enumerators from pdffit.h: - # selection of all atoms - selalias = {"ALL": -1} - # constraint type identifiers - FCON = {"USER": 0, "IDENT": 1, "FCOMP": 2, "FSQR": 3} - # scattering type identifiers - Sctp = {"X": 0, "N": 1} - - def _exportAll(self, namespace): - """_exportAll(self, namespace) --> Export all 'public' class - methods into namespace. - - This function allows for a module-level PdfFit object which - doesn't have to be referenced when calling a method. This - function makes old (python) scripts compatible with this class. - At the top of the script, create a pdffit object, and then call - this method. Usually, namespace = locals(). - """ - # string aliases (var = "var") - for a in itertools.chain(self.selalias, self.FCON, self.Sctp): - exec("%s = %r" % (a, a), namespace) - public = [ - a - for a in dir(self) - if "__" not in a - and a not in ["_handle", "_exportAll", "selalias", "FCON", "Sctp"] - ] - for funcname in public: - namespace[funcname] = getattr(self, funcname) - return - - def intro(): - """Show introductory message.""" - import re - - from diffpy.pdffit2 import __date__, __version__ - - date = __date__[:10] - d = {"version": __version__, "date": date, "year": date[:4] or "2019"} - msg = __intro_message__ % d - - def filler(mx): - return mx.group(0).rstrip(" *").ljust(77) + "*" - - msg_ljust = re.sub("(?m)^(.{1,77}|.{79}.*)$", filler, msg) - print(msg_ljust, file=output.stdout) - return - - intro = staticmethod(intro) - - def add_structure(self, stru): - """add_structure(stru) --> Add new structure to PdfFit instance. - - stru -- instance of Structure class from diffpy.structure. - - No return value. - Raises pdffit2.structureError when stru contains unknown - atom species. - """ - s = stru.writeStr("pdffit") - self.read_struct_string(s) - return - - def read_struct(self, struct): - """read_struct(struct) --> Read structure from file into memory. - - struct -- name of file from which to read structure - - Raises: - pdffit2.calculationError when a lattice cannot be created from the - given structure - pdffit2.structureError when a structure file is malformed - IOError when the file cannot be read from the disk - """ - pdffit2.read_struct(self._handle, struct) - self.stru_files.append(struct) - return - - def read_struct_string(self, struct, name=""): - """read_struct_string(struct, name = "") --> Read structure from - a string into memory. - - struct -- string containing the contents of the structure file - name -- tag with which to label structure - - Raises: - pdffit2.calculationError when a lattice cannot be created from the - given structure - pdffit2.structureError when a structure file is malformed - """ - pdffit2.read_struct_string(self._handle, struct) - self.stru_files.append(name) - return - - def read_data(self, data, stype, qmax, qdamp): - """read_data(data, stype, qmax, qdamp) --> Read pdf data from - file into memory. - - data -- name of file from which to read data - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - - Raises: IOError when the file cannot be read from disk - """ - pdffit2.read_data(self._handle, data, stype.encode(), qmax, qdamp) - self.data_files.append(data) - return - - def read_data_string(self, data, stype, qmax, qdamp, name=""): - """read_data_string(data, stype, qmax, qdamp, name = "") --> - Read pdf data from a string into memory. - - data -- string containing the contents of the data file - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - name -- tag with which to label data - """ - pdffit2.read_data_string( - self._handle, data, stype.encode(), qmax, qdamp, name - ) - name = data - self.data_files.append(name) - return - - def read_data_lists( - self, stype, qmax, qdamp, r_data, Gr_data, dGr_data=None, name="list" - ): - """read_data_lists(stype, qmax, qdamp, r_data, Gr_data, dGr_data - = None, name = "list") --> Read pdf data into memory from lists. - - All lists must be of the same length. - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - r_data -- list of r-values - Gr_data -- list of G(r) values - dGr_data -- list of G(r) uncertainty values - name -- tag with which to label data - - Raises: ValueError when the data lists are of different length - """ - pdffit2.read_data_arrays( - self._handle, - stype.encode(), - qmax, - qdamp, - r_data, - Gr_data, - dGr_data, - name, - ) - self.data_files.append(name) - return - - def pdfrange(self, iset, rmin, rmax): - """Pdfrange(iset, rmin, rmax) --> Set the range of the fit. - - iset -- data set to consider - rmin -- minimum r-value of fit - rmax -- maximum r-value of fit - - Raises: ValueError for bad input values - """ - pdffit2.pdfrange(self._handle, iset, rmin, rmax) - return - - def reset(self): - """Reset() --> Clear all stored fit, structure, and parameter - data.""" - self.stru_files = [] - self.data_files = [] - pdffit2.reset(self._handle) - return - - def alloc(self, stype, qmax, qdamp, rmin, rmax, bin): - """Alloc(stype, qmax, qdamp, rmin, rmax, bin) --> Allocate space - for a PDF calculation. - - The structure from which to calculate the PDF must first be imported - with the read_struct() or read_struct_string() method. - - stype -- 'X' (xray) or 'N' (neutron) - qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples. - qdamp -- instrumental Q-resolution factor - rmin -- minimum r-value of calculation - rmax -- maximum r-value of calculation - bin -- number of data points in calculation - - Raises: - ValueError for bad input values - pdffit.unassignedError when no structure has been loaded - """ - pdffit2.alloc( - self._handle, stype.encode(), qmax, qdamp, rmin, rmax, bin - ) - return - - def calc(self): - """Calc() --> Calculate the PDF of the imported structure. - - Space for the calculation must first be allocated with the alloc() - method. - - Raises: - pdffit2.calculationError when allocated space cannot - accommodate calculation - pdffit.unassignedError when space for calculation has not been - allocated - """ - pdffit2.calc(self._handle) - return - - def refine(self, toler=0.00000001): - """Refine(toler = 0.00000001) --> Fit the theory to the imported - data. - - toler -- tolerance of the fit - - Raises: - pdffit2.calculationError when the model pdf cannot be calculated - pdffit2.constraintError when refinement fails due to bad - constraint - pdffit2.unassigedError when a constraint used but never initialized - using setpar() - """ - step = 0 - finished = 0 - while not finished: - finished = pdffit2.refine_step(self._handle, toler) - step += 1 - return - - def refine_step(self, toler=0.00000001): - """refine_step(toler = 0.00000001) --> Run a single step of the - fit. - - toler -- tolerance of the fit - - Raises: - pdffit2.calculationError when the model pdf cannot be calculated - pdffit2.constraintError when refinement fails due to bad - constraint - pdffit2.unassigedError when a constraint used but never initialized - using setpar() - - Returns: 1 (0) if refinement is (is not) finished - """ - self.finished = pdffit2.refine_step(self._handle, toler) - return self.finished - - def save_pdf(self, iset, fname): - """save_pdf(iset, fname) --> Save calculated or fitted PDF to - file. - - iset -- data set to save - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if the data set is undefined - """ - pdffit2.save_pdf(self._handle, iset, fname) - return - - def save_pdf_string(self, iset): - """save_pdf_string(iset) --> Save calculated or fitted PDF to - string. - - iset -- data set to save - - Raises: - pdffit2.unassignedError if the data set is undefined - - Returns: string containing contents of save file - """ - pdffilestring = pdffit2.save_pdf(self._handle, iset, "") - return pdffilestring - - def save_dif(self, iset, fname): - """save_dif(iset, fname) --> Save data and fitted PDF difference - to file. - - iset -- data set to save - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if the data set is undefined - """ - pdffit2.save_dif(self._handle, iset, fname) - return - - def save_dif_string(self, iset): - """save_dif_string(iset) --> Save data and fitted PDF difference - to string. - - iset -- data set to save - - Raises: - pdffit2.unassignedError if the data set is undefined - - Returns: string containing contents of save file - """ - diffilestring = pdffit2.save_dif(self._handle, iset, "") - return diffilestring - - def save_res(self, fname): - """save_res(fname) --> Save fit-specific data to file. - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if there is no refinement data to save - """ - pdffit2.save_res(self._handle, fname) - return - - def save_res_string(self): - """save_res_string() --> Save fit-specific data to a string. - - Raises: - pdffit2.unassignedError if there is no refinement data to save - - Returns: string containing contents of save file - """ - resfilestring = pdffit2.save_res(self._handle, "") - return resfilestring - - def get_structure(self, ip): - """get_structure(ip) --> Get a copy of specified phase data. - - ip -- index of existing PdfFit phase starting from 1 - - Return Structure object from diffpy.structure. - Raise pdffit2.unassignedError if phase ip is undefined. - """ - from diffpy.structure import PDFFitStructure - - s = self.save_struct_string(ip) - stru = PDFFitStructure() - stru.readStr(s, "pdffit") - return stru - - def save_struct(self, ip, fname): - """save_struct(ip, fname) --> Save structure resulting from fit - to file. - - ip -- phase to save - - Raises: - IOError if file cannot be saved - pdffit2.unassignedError if the data set is undefined - """ - pdffit2.save_struct(self._handle, ip, fname) - return - - def save_struct_string(self, ip): - """save_struct(ip) --> Save structure resulting from fit to - string. - - ip -- phase to save - - Raises: - pdffit2.unassignedError if phase ip is undefined. - - Returns: string containing contents of save file - """ - structfilestring = pdffit2.save_struct(self._handle, ip, "") - return structfilestring - - def show_struct(self, ip): - """show_struct(ip) --> Print structure resulting from fit. - - ip -- phase to display - - Raises: pdffit2.unassignedError if the phase is undefined - """ - pdffit2.show_struct(self._handle, ip) - return - - def constrain(self, var, par, fcon=None): - """Constrain(var, par[, fcon]) --> Constrain a variable to a - parameter. - - A variable can be constrained to a number or equation string. - - :param var: variable to constrain, such as x(1) - :param par: parameter which to constrain the variable. This can be an - integer or an equation string containing a reference to - another parameter. Equation strings use standard C++ - syntax. The value of a constrained parameter is accessed - as ``@p`` in an equation string, where ``p`` is the - parameter. - :type par: int or str - :param fcon: 'USER', 'IDENT', 'FCOMP', or 'FSQR'. This is an optional - parameter; usage is currently unclear. - :type fcon: str - - Example:: - - >>> constrain(x(1), 1) - >>> constrain(x(2), "0.5+@1") - - :raises pdffit2.constraintError: if a constraint is bad - :raises pdffit2.unassignedError: if variable does not yet exist - :raises ValueError: if variable index does not exist (e.g. lat(7)) - """ - - var_ref = self.__getRef(var) - varnc = _convertCallable(var) - if fcon: - fc = self.FCON[fcon] - pdffit2.constrain_int(self._handle, var_ref, varnc, par, fc) - elif isinstance(par, str): - pdffit2.constrain_str(self._handle, var_ref, varnc, par) - else: - pdffit2.constrain_int(self._handle, var_ref, varnc, par) - return - - def setpar(self, par, val): - """Setpar(par, val) --> Set value of constrained parameter. - - val -- Either a numerical value or a reference to a variable - - Raises: - pdffit2.unassignedError when variable is yet to be assigned - """ - # people do not use parenthesis, e.g., "setpar(3, qdamp)" - # in such case val is a reference to PdfFit method - val = _convertCallable(val) - try: - val = float(val) - pdffit2.setpar_dbl(self._handle, par, val) - except ValueError: - var_ref = self.__getRef(val) - pdffit2.setpar_RV(self._handle, par, var_ref) - return - - def setvar(self, var, val): - """Setvar(var, val) --> Set the value of a variable. - - Raises: - pdffit2.unassignedError if variable does not yet exist - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_ref = self.__getRef(var) - pdffit2.setvar(self._handle, var_ref, val) - return - - def getvar(self, var): - """Getvar(var) --> Get stored value of a variable. - - Raises: - pdffit2.unassignedError if variable does not yet exist - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_ref = self.__getRef(var) - retval = pdffit2.getvar(self._handle, var_ref) - return retval - - def getrw(self): - """Getrw() --> Get normalized total error of the fit rw. - - getrw calculates total fit error summed for all datasets in the - fit. - - Return float. - """ - rw = pdffit2.getrw(self._handle) - return rw - - def getcrw(self): - """Getcrw() --> Get cumulative Rw for the current dataset. - - Cumulative Rw is a list of Rw partial sums cost values evaluated against - observed PDF data in the error sums evaluated against - the r-points in the fit. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of crw points, equidistant in r or empty list - if the refine function has not been called yet. - """ - crw = pdffit2.getcrw(self._handle) - return crw - - def getR(self): - """GetR() --> Get r-points used in the fit. - - This function should only be called after data has been loaded or - calculated. Before a refinement, the list of r-points will reflect the - data. Afterwards, they will reflect the fit range. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of equidistance r-points used in fit. - """ - R = pdffit2.getR(self._handle) - return R - - def getpdf_fit(self): - """getpdf_fit() --> Get fitted PDF. - - This function should only be called after a refinement or refinement - step has been done. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of fitted points, equidistant in r. - """ - pdfdata = pdffit2.getpdf_fit(self._handle) - return pdfdata - - def getpdf_obs(self): - """getpdf_obs() --> Get observed PDF. - - This function should only be called after data has been loaded or - calculated. Before a refinement, the list of r-points will reflect the - data. Afterwards, they will reflect the fit range. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of data points, equidistant in r. - """ - pdfdata = pdffit2.getpdf_obs(self._handle) - return pdfdata - - def getpdf_diff(self): - """Obtain difference between observed and fitted PDF. - - This function should only be called after data has been loaded or - calculated. Before a refinement, the list of r-points will reflect the - data. Afterwards, they will reflect the fit range. - - Raises: pdffit2.unassignedError if no data exists - - Returns: List of data points, equidistant in r. - """ - Gdiff = pdffit2.getpdf_diff(self._handle) - return Gdiff - - def get_atoms(self, ip=None): - """get_atoms() --> Get element symbols of all atoms in the - structure. - - ip -- index of phase to get the elements from (starting from 1) - when ip is not given, use current phase - - This function should only be called after a structure has been loaded. - - Raises: pdffit2.unassignedError if no structure exists - - Returns: List of atom names in structure. - """ - if ip is None: - rv = pdffit2.get_atoms(self._handle) - else: - rv = pdffit2.get_atoms(self._handle, ip) - return rv - - def get_atom_types(self, ip=None): - """get_atom_types() --> Ordered unique element symbols in the - structure. - - ip -- index of phase to get the elements from (starting from 1) - when ip is not given, use current phase - - This function should only be called after a structure has been loaded. - - Raises: - pdffit2.unassignedError if no structure exists - - Returns: List of unique atom symbols as they occur in structure. - """ - if ip is None: - rv = pdffit2.get_atom_types(self._handle) - else: - rv = pdffit2.get_atom_types(self._handle, ip) - return rv - - def getpar(self, par): - """Getpar(par) --> Get value of parameter. - - Raises: ValueError if parameter does not exists - """ - return pdffit2.getpar(self._handle, par) - - def fixpar(self, par): - """Fixpar(par) --> Fix a parameter. - - Fixed parameters are not fitted in a refinement. Passed parameter - can be 'ALL', in which case all parameters are fixed. - - Raises: pdffit.unassignedError when parameter has not been assigned - """ - if isinstance(par, str) and par.upper() in self.selalias: - par = self.selalias[par.upper()] - pdffit2.fixpar(self._handle, par) - return - - def freepar(self, par): - """Freepar(par) --> Free a parameter. - - Freed parameters are fitted in a refinement. Passed parameter - can be 'ALL', in which case all parameters are freed. - - Raises: pdffit.unassignedError when parameter has not been assigned - """ - if isinstance(par, str) and par.upper() in self.selalias: - par = self.selalias[par.upper()] - pdffit2.freepar(self._handle, par) - return - - def setphase(self, ip): - """Setphase(ip) --> Switch to phase ip. - - ip -- index of the phase starting at 1. - - All parameters assigned after this method is called refer only to the - current phase. - - Raises: pdffit.unassignedError when phase does not exist - """ - pdffit2.setphase(self._handle, ip) - return - - def setdata(self, iset): - """Setdata(iset) --> Set the data set in focus. - - iset -- integer index of data set starting at 1. - - Raises: pdffit.unassignedError when data set does not exist - """ - pdffit2.setdata(self._handle, iset) - return - - def psel(self, ip): - """Psel(ip) --> Include phase ip in calculation of total PDF. - - psel('ALL') selects all phases for PDF calculation. - - Raises: pdffit2.unassignedError if selected phase does not exist - """ - if isinstance(ip, str) and ip.upper() in self.selalias: - ip = self.selalias[ip.upper()] - pdffit2.psel(self._handle, ip) - return - - def pdesel(self, ip): - """Pdesel(ip) --> Exclude phase ip from calculation of total - PDF. - - pdesel('ALL') excludes all phases from PDF calculation. - - Raises: pdffit2.unassignedError if selected phase does not exist - """ - if isinstance(ip, str) and ip.upper() in self.selalias: - ip = self.selalias[ip.upper()] - pdffit2.pdesel(self._handle, ip) - return - - def selectAtomType(self, ip, ijchar, symbol, flag): - """Configure partial PDF - mark the specified atom type in phase ip - as included or excluded as a first or second in pair for distance - evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - symbol -- element symbol - flag -- bool flag, True for selection, False for exclusion - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError for invalid value of ijchar - """ - pdffit2.selectAtomType(self._handle, ip, ijchar.encode(), symbol, flag) - return - - def selectAtomIndex(self, ip, ijchar, aidx, flag): - """Configure partial PDF - mark the atom of given index in phase ip - as included or excluded as a first or second in pair for distance - evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - aidx -- integer index of atom starting at 1 - flag -- bool flag, True for selection, False for exclusion - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError if atom index or ijchar are invalid - """ - pdffit2.selectAtomIndex(self._handle, ip, ijchar.encode(), aidx, flag) - return - - def selectAll(self, ip, ijchar): - """Configure partial PDF - include all atoms of phase ip as first or - second element in pair for distance evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError if ijchar is invalid - """ - pdffit2.selectAll(self._handle, ip, ijchar.encode()) - return - - def selectNone(self, ip, ijchar): - """Configure partial PDF - exclude all atoms of phase ip from first - or second element of pair distance evaluation. - - ip -- phase index starting at 1 - ijchar -- 'i' or 'j' for first or second in pair - - Raises: - pdffit2.unassignedError if selected phase does not exist - ValueError if ijchar is invalid - """ - pdffit2.selectNone(self._handle, ip, ijchar.encode()) - return - - def bang(self, i, j, k): - """Bang(i, j, k) --> Show bond angle defined by atoms i, j, k. - - No return value. Use bond_angle() to get the result. - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded - """ - angle, stdev = pdffit2.bond_angle(self._handle, i, j, k) - # indices should be already checked here by bond_angle - atom_symbols = self.get_atoms() - leader = " %s (#%i) - %s (#%i) - %s (#%i) = " % ( - atom_symbols[i - 1], - i, - atom_symbols[j - 1], - j, - atom_symbols[k - 1], - k, - ) - s = leader + _format_value_std(angle, stdev) + " degrees" - print(s, file=output.stdout) - return - - def bond_angle(self, i, j, k): - """bond_angle(i, j, k) --> bond angle defined by atoms i, j, k. - Angle is calculated using the shortest ji and jk lengths with - respect to periodic boundary conditions. - - i, j, k -- atom indices starting at 1 - - Return a tuple of (angle, angle_error), both values are in degrees. - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded - """ - rv = pdffit2.bond_angle(self._handle, i, j, k) - return rv - - def blen(self, *args): - """Blen(i, j) --> Show bond length defined by atoms i and j. - - i -- index of the first atom starting at 1 - j -- index of the second atom starting at 1 - - No return value. Use bond_length_atoms() to retrieve result. - - Second form: - - blen(a1, a2, lb, ub) --> Show sorted lengths of all a1-a2 bonds. - - a1 -- symbol of the first element in pair or "ALL" - a2 -- symbol of the second element in pair or "ALL" - lb -- lower bond length boundary - ub -- upper bond length boundary - - No return value. Use bond_length_types() to retrieve results. - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded - """ - # first form - if len(args) == 2: - dij, ddij = self.bond_length_atoms(*args[0:2]) - atom_symbols = self.get_atoms() - ij = (args[0], args[1]) - # indices were already checked in bond_length_atoms call - assert (0 <= min(ij) - 1) and (max(ij) - 1 < len(atom_symbols)) - symij = ( - atom_symbols[ij[0] - 1].upper(), - atom_symbols[ij[1] - 1].upper(), - ) - print( - _format_bond_length(dij, ddij, ij, symij), file=output.stdout - ) - # second form - elif len(args) == 4: - a1, a2, lb, ub = args - try: - atom_types = self.get_atom_types() - if isinstance(a1, numbers.Integral): - a1 = atom_types[a1 - 1] - if isinstance(a2, numbers.Integral): - a2 = atom_types[a2 - 1] - except IndexError: - # index of non-existent atom type - return - # arguments are OK here, get bond length dictionary - bld = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - s = "(%s,%s) bond lengths in [%gA,%gA] for current phase :" % ( - a1, - a2, - lb, - ub, - ) - print(s, file=output.stdout) - atom_symbols = self.get_atoms() - npts = len(bld["dij"]) - for idx in range(npts): - dij = bld["dij"][idx] - ddij = bld["ddij"][idx] - ij0 = bld["ij0"][idx] - ij1 = bld["ij1"][idx] - symij = (atom_symbols[ij0[0]], atom_symbols[ij0[1]]) - s = _format_bond_length(dij, ddij, ij1, symij) - print(s, file=output.stdout) - print(file=output.stdout) - if not bld["dij"]: - print(" *** No pairs found ***", file=output.stdout) - else: - emsg = "blen() takes 2 or 4 arguments (%i given)" % len(args) - raise TypeError(emsg) - # done - return - - def bond_length_atoms(self, i, j): - """bond_length_atoms(i, j) --> shortest distance between atoms - i, j. Periodic boundary conditions are applied to find the - shortest bond. - - i -- index of the first atom starting at 1 - j -- index of the second atom starting at 1 - - Return a tuple of (distance, distance_error). - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded. - """ - rv = pdffit2.bond_length_atoms(self._handle, i, j) - return rv - - def bond_length_types(self, a1, a2, lb, ub): - """bond_length_types(a1, a2, lb, ub) --> get all a1-a2 - distances. - - a1 -- symbol of the first element in pair or "ALL" - a2 -- symbol of the second element in pair or "ALL" - lb -- lower bond length boundary - ub -- upper bond length boundary - - Return a dictionary of distance data containing - - dij : list of bond lengths within given bounds - ddij : list of bond length standard deviations - ij0 : pairs of atom indices starting from 0 - ij1 : pairs of atom indices starting from 1 - - Raises: ValueError if selected atom(s) does not exist - pdffit.unassignedError when no structure has been loaded. - """ - rv = pdffit2.bond_length_types(self._handle, a1, a2, lb, ub) - return rv - - def show_scat(self, stype): - """show_scat(stype) --> Print scattering length for all atoms in - the current phase. - - stype -- 'X' (xray) or 'N' (neutron). - - Raises: pdffit2.unassignedError if no phase exists - """ - print(self.get_scat_string(stype), file=output.stdout) - return - - def get_scat_string(self, stype): - """get_scat_string(stype) --> Get string with scattering factors - of all atoms in the current phase. - - stype -- 'X' (xray) or 'N' (neutron). - - Raises: - pdffit2.unassignedError if no phase exists - - Returns: string with all scattering factors. - """ - return pdffit2.get_scat_string(self._handle, stype.encode()) - - def get_scat(self, stype, element): - """get_scat(stype, element) --> Get active scattering factor for - given element. If scattering factor has been changed using - set_scat the result may depend on the active phase. When no - phase has been loaded, return the standard value. - - stype -- 'X' (xray) or 'N' (neutron). - element -- case-insensitive element symbol such as "Na" or "CL" - - Return float. - - Raises: - ValueError if element is not known. - """ - rv = pdffit2.get_scat(self._handle, stype.encode(), element) - return rv - - def set_scat(self, stype, element, value): - """set_scat(stype, element, value) --> Set custom scattering - factor for given element. The new scattering factor applies - only for the current phase, in other phases it keeps its default - value. - - stype -- 'X' (xray) or 'N' (neutron). - element -- case-insensitive element symbol such as "Na" or "CL" - value -- new value of scattering factor - - No return value. - - Raises: - pdffit2.unassignedError if no phase exists. - ValueError if element is not known. - - See also reset_scat, get_scat. - """ - pdffit2.set_scat(self._handle, stype.encode(), element, value) - return - - def reset_scat(self, element): - """reset_scat(stype, element) --> Reset scattering factors for - given element to their standard values. The reset_scat applies - only for the current phase. - - element -- case-insensitive element symbol such as "Na" or "CL" - Raises: - pdffit2.unassignedError if no phase exists - ValueError if element is not known. - """ - pdffit2.reset_scat(self._handle, element) - return - - def num_atoms(self): - """num_atoms() --> Get number of atoms in current phase. - - Raises: pdffit2.unassignedError if no atoms exist - """ - return pdffit2.num_atoms(self._handle) - - def num_phases(self): - """num_phases() --> Number of phases loaded in PdfFit instance. - - Use setphase to bring a specific phase in focus. - - Return integer. - """ - n = pdffit2.num_phases(self._handle) - return n - - def num_datasets(self): - """num_datasets() --> Number of datasets loaded in PdfFit - instance. - - Use setdata to bring a specific dataset in focus. - - Return integer. - """ - n = pdffit2.num_datasets(self._handle) - return n - - def phase_fractions(self): - """phase_fractions() --> relative phase fractions for current - dataset. Convert phase scale factors to relative phase fractions - given the scattering type of current dataset. - - Return a dictionary of phase fractions with following keys: - - "atom" -- list of fractions normalized to atom count - "stdatom" -- errors of atom count fractions - "cell" -- list of fractions normalized to unit cell count - "stdcell" -- errors of unit cell count fractions - "mass" -- list of relative weight fractions - "stdmass" -- errors of relative weight fractions - - Raises: pdffit2.unassignedError if no dataset exists. - """ - return pdffit2.phase_fractions(self._handle) - - # Begin refinable variables. - - def lat(n): - """Lat(n) --> Get reference to lattice variable n. - - n can be an integer or a string representing the lattice - variable. 1 <==> 'a' 2 <==> 'b' 3 <==> 'c' 4 <==> 'alpha' 5 <==> - 'beta' 6 <==> 'gamma' - """ - LatParams = {"a": 1, "b": 2, "c": 3, "alpha": 4, "beta": 5, "gamma": 6} - if isinstance(n, str): - n = LatParams[n] - return "lat(%i)" % n - - lat = staticmethod(lat) - - def x(i): - """X(i) --> Get reference to x-value of atom i.""" - return "x(%i)" % i - - x = staticmethod(x) - - def y(i): - """Y(i) --> Get reference to y-value of atom i.""" - return "y(%i)" % i - - y = staticmethod(y) - - def z(i): - """Z(i) --> Get reference to z-value of atom i.""" - return "z(%i)" % i - - z = staticmethod(z) - - def u11(i): - """U11(i) --> Get reference to U(1,1) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u11(%i)" % i - - u11 = staticmethod(u11) - - def u22(i): - """U22(i) --> Get reference to U(2,2) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u22(%i)" % i - - u22 = staticmethod(u22) - - def u33(i): - """U33(i) --> Get reference to U(3,3) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u33(%i)" % i - - u33 = staticmethod(u33) - - def u12(i): - """U12(i) --> Get reference to U(1,2) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u12(%i)" % i - - u12 = staticmethod(u12) - - def u13(i): - """U13(i) --> Get reference to U(1,3) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u13(%i)" % i - - u13 = staticmethod(u13) - - def u23(i): - """U23(i) --> Get reference to U(2,3) for atom i. - - U is the anisotropic thermal factor tensor. - """ - return "u23(%i)" % i - - u23 = staticmethod(u23) - - def occ(i): - """Occ(i) --> Get reference to occupancy of atom i.""" - return "occ(%i)" % i - - occ = staticmethod(occ) - - def pscale(): - """Pscale() --> Get reference to pscale. - - pscale is the fraction of the total structure that the current - phase represents. - """ - return "pscale" - - pscale = staticmethod(pscale) - - def sratio(): - """Sratio() --> Get reference to sigma ratio. - - The sigma ratio determines the reduction in the Debye-Waller - factor for distances below rcut. - """ - return "sratio" - - sratio = staticmethod(sratio) - - def delta1(): - """Delta1() --> Get reference to 1/R peak sharpening factor.""" - return "delta1" - - delta1 = staticmethod(delta1) - - def delta2(): - """Delta2() --> Reference to (1/R^2) sharpening factor. - - The phenomenological correlation constant in the Debye-Waller - factor. The (1/R^2) peak sharpening factor. - """ - return "delta2" - - delta2 = staticmethod(delta2) - - def dscale(): - """Dscale() --> Get reference to dscale. - - The data scale factor. - """ - return "dscale" - - dscale = staticmethod(dscale) - - def qdamp(): - """Qdamp() --> Get reference to qdamp. - - Qdamp controls PDF damping due to instrument Q-resolution. - """ - return "qdamp" - - qdamp = staticmethod(qdamp) - - def qbroad(): - """Qbroad() --> Get reference to qbroad. - - Quadratic peak broadening factor. - """ - return "qbroad" - - qbroad = staticmethod(qbroad) - - def spdiameter(): - """Spdiameter() --> Get reference to spdiameter (phase - property). - - Diameter value for the spherical particle PDF correction. - Spherical envelope is not applied when spdiameter equals 0. - """ - return "spdiameter" - - spdiameter = staticmethod(spdiameter) - - def stepcut(): - """Stepcut() --> Get reference to stepcut (phase property). - - stepcut is cutoff radius for empirical step-function PDF - envelope. stepcut can be used to approximate loss of pair - correlations in amorphous phase. stepcut cannot be refined. - - Step cutoff is not applied when stepcut equals 0. - """ - return "stepcut" - - stepcut = staticmethod(stepcut) - - def rcut(): - """Rcut() --> Get reference to rcut. - - rcut is the value of r below which peak sharpening, defined by - the sigma ratio (sratio), applies. rcut cannot be refined. - """ - return "rcut" - - rcut = staticmethod(rcut) - - # End refinable variables. - - def __init__(self, create_intro=True): - """Initialize the Pdffit class, create a new PdfFit object. - - Parameters - ---------- - create_intro : bool, optional - The flag to control the display of an introduction message. - If True, display an introduction message, else not. Default is True. - """ - - self.stru_files = [] - self.data_files = [] - - self._handle = pdffit2.create() - if create_intro: - self.intro() - return - - def __getRef(self, var_string): - """Return the actual reference to the variable in the - var_string. - - This function must be called before trying to actually reference an - internal variable. See the constrain method for an example. - - Raises: - pdffit2.unassignedError if variable is not yet assigned - ValueError if variable index does not exist (e.g. lat(7)) - """ - var_string = _convertCallable(var_string) - arg_int = None - try: - method_string, arg_string = var_string.split("(") - method_string = method_string.strip() - arg_int = int(arg_string.strip(")").strip()) - except ValueError: # There is no arg_string - method_string = var_string.strip() - - f = getattr(pdffit2, method_string) - if arg_int is None: - retval = f(self._handle) - else: - retval = f(self._handle, arg_int) - return retval - - -# End of class PdfFit - - -# End of file diff --git a/src/diffpy/pdffit2/pdffit2_app.py b/src/diffpy/pdffit2/pdffit2_app.py deleted file mode 100644 index d8ff2fd0..00000000 --- a/src/diffpy/pdffit2/pdffit2_app.py +++ /dev/null @@ -1,33 +0,0 @@ -import argparse - -from diffpy.pdffit2.version import __version__ # noqa - - -def main(): - parser = argparse.ArgumentParser( - prog="diffpy.pdffit2", - description=( - "PDFfit2 - real space structure refinement program.\n\n" - "For more information, visit: " - "https://github.com/diffpy/diffpy.pdffit2/" - ), - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - - parser.add_argument( - "--version", - action="store_true", - help="Show the program's version number and exit", - ) - - args = parser.parse_args() - - if args.version: - print(f"diffpy.pdffit2 {__version__}") - else: - # Default behavior when no arguments are given - parser.print_help() - - -if __name__ == "__main__": - main() diff --git a/src/diffpy/pdffit2/version.py b/src/diffpy/pdffit2/version.py deleted file mode 100644 index ee14bcd3..00000000 --- a/src/diffpy/pdffit2/version.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2025-2026 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors # noqa: E501 -# -# See LICENSE.rst for license information. -# -############################################################################## -"""Definition of __version__.""" - -# We do not use the other three variables, but can be added back if needed. -# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] - -import datetime -import json -import urllib.request - -# obtain version information -from importlib.metadata import PackageNotFoundError, version -from pathlib import Path - - -def get_pypi_release_date(package_name, timeout=5): - package_file = Path(__file__).resolve() - - try: - with open(package_file, "r", encoding="utf-8") as f: - lines = f.readlines() - for line in reversed(lines): - if line.startswith("# Release date:"): - return line.split(":", 1)[1].strip() - - url = f"https://pypi.org/pypi/{package_name}/json" - with urllib.request.urlopen(url, timeout=timeout) as response: - data = json.loads(response.read().decode("utf-8")) - - installed_version = version(package_name) - release_data = data["releases"].get(installed_version, []) - if not release_data: - raise ValueError( - f"No release data found for version {installed_version}" - ) - - release_date_str = release_data[-1]["upload_time"] - release_date = datetime.datetime.fromisoformat(release_date_str).date() - - with open(package_file, "a", encoding="utf-8") as f: - f.write(f"\n# Release date: {release_date}") - - except (ValueError, OSError) as e: - print(f"Warning: Could not fetch release date from PyPI: {e}") - release_date = datetime.datetime.fromtimestamp( - package_file.stat().st_ctime - ).isoformat() - - return str(release_date) - - -__date__ = get_pypi_release_date("diffpy.pdffit2") - -try: - __version__ = version("diffpy.pdffit2") -except PackageNotFoundError: - __version__ = "unknown" diff --git a/src/extensions/libpdffit2/Atom.cc b/src/extensions/libpdffit2/Atom.cc deleted file mode 100644 index aa2e66f2..00000000 --- a/src/extensions/libpdffit2/Atom.cc +++ /dev/null @@ -1,104 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class Atom -* -* Comments: -* -***********************************************************************/ - -#include - -#include "Atom.h" -#include "MathUtils.h" -#include "LocalPeriodicTable.h" - -using namespace std; - -// class data - private - - -Atom::AtomFormat Atom::streamformat = Atom::DISCUS; - - -// public class methods - - -void Atom::setDiscusFormat() -{ - Atom::streamformat = DISCUS; -} - - -void Atom::setPdffitFormat() -{ - Atom::streamformat = PDFFIT; -} - - -// private methods - - -istream& Atom::read_discus_atom(istream& in) -{ - double B; - string symbol; - const double fac = 1.0 / (8.0*M_PI*M_PI); - in >> symbol >> pos[0] >> pos[1] >> pos[2] >> B; - if (!in) return in; - // here we read successfully - const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); - atom_type = lpt->lookup(symbol); - fill_n(u, 3, fac*B); - fill_n(u+3, 3, 0.0); - occ = 1.0; - docc = 0.0; - fill_n(dpos, 3, 0.0); - fill_n(du, 6, 0.0); - return in; -} - - -istream& Atom::read_pdffit_atom(istream& in) -{ - string symbol; - in >> symbol >> pos[0] >> pos[1] >> pos[2] >> occ >> - dpos[0] >> dpos[1] >> dpos[2] >> docc >> - u[0] >> u[1] >> u[2] >> - du[0] >> du[1] >> du[2] >> - u[3] >> u[4] >> u[5] >> - du[3] >> du[4] >> du[5]; - if (!in) return in; - // here we read successfully - const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); - atom_type = lpt->lookup(symbol); - return in; -} - - -// non-member operators - - -istream& operator>>(istream& in, Atom& a) -{ - switch (Atom::streamformat) - { - case Atom::DISCUS: return a.read_discus_atom(in); - case Atom::PDFFIT: return a.read_pdffit_atom(in); - }; - return in; -} - - -// End of file diff --git a/src/extensions/libpdffit2/Atom.h b/src/extensions/libpdffit2/Atom.h deleted file mode 100644 index 11955036..00000000 --- a/src/extensions/libpdffit2/Atom.h +++ /dev/null @@ -1,70 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class Atom -* -* Comments: -* -***********************************************************************/ - -#ifndef ATOM_H_INCLUDED -#define ATOM_H_INCLUDED - -#include -#include "AtomType.h" - -class PdfFit; -class DataSet; -class Phase; - -class Atom -{ - // friends who need to touch offset - friend class PdfFit; - friend class DataSet; - friend class Phase; - friend std::istream& operator>>(std::istream& in, Atom& a); - - public: - - // class methods - static void setDiscusFormat(); - static void setPdffitFormat(); - - // data - const AtomType* atom_type; - double weight; // normalized scattering factor - double pos[3], dpos[3]; - double u[6], du[6]; - double occ, docc; - - private: - - // types and class data - enum AtomFormat { DISCUS, PDFFIT }; - static AtomFormat streamformat; - - // data - int offset; - - // methods - std::istream& read_discus_atom(std::istream& in); - std::istream& read_pdffit_atom(std::istream& in); -}; - -// non-member operators - -std::istream& operator>>(std::istream& in, Atom& a); - -#endif // ATOM_H_INCLUDED diff --git a/src/extensions/libpdffit2/AtomType.h b/src/extensions/libpdffit2/AtomType.h deleted file mode 100644 index 4c002e8d..00000000 --- a/src/extensions/libpdffit2/AtomType.h +++ /dev/null @@ -1,76 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class AtomType -* -* Comments: storage of element properties like name, symbol, -* atomic mass or scattering power -* -***********************************************************************/ - -#ifndef ATOMTYPE_H_INCLUDED -#define ATOMTYPE_H_INCLUDED - -#include -#include -#include - -class AtomType -{ - public: - // Data - std::string symbol; // element symbol - std::string name; // element name - bool isotope; // flag for isotopes - int z; // atomic number - double M; // atomic mass - int charge; // total charge in e - double radius; // ionic radius - double xsf; // x-ray scattering factor - double nsf; // neutron scattering factor - - // Constructor - AtomType() - { - z = 0; - M = 0.0; - isotope = false; - charge = 0; - radius = 0.0; - xsf = 0.0; - nsf = 0.0; - } - - // Methods - double sf(char scattering_type) const - { - switch (scattering_type) - { - case 'x': - case 'X': - return xsf; - case 'n': - case 'N': - return nsf; - default: - std::ostringstream emsg; - emsg << "Invalid scattering type '" << - scattering_type << "'"; - throw std::runtime_error(emsg.str()); - } - return 0.0; - } -}; - -#endif // ATOMTYPE_H_INCLUDED diff --git a/src/extensions/libpdffit2/LocalPeriodicTable.cc b/src/extensions/libpdffit2/LocalPeriodicTable.cc deleted file mode 100644 index 482f2f10..00000000 --- a/src/extensions/libpdffit2/LocalPeriodicTable.cc +++ /dev/null @@ -1,147 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2008 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class LocalPeriodicTable -* -* Comments: Light-weight class which allows redefinitions of scattering -* factors. This class throws ValueError for unknown elements. -* -***********************************************************************/ - -#include -#include "LocalPeriodicTable.h" -#include "exceptions.h" - -using namespace std; - - -// public class methods - - -const LocalPeriodicTable* LocalPeriodicTable::instance() -{ - static unique_ptr the_table(new LocalPeriodicTable()); - return the_table.get(); -} - - -// constructor - - -LocalPeriodicTable::LocalPeriodicTable() -{ - // private data - this->_periodic_table = PeriodicTable::instance(); -} - - -// public methods - - -const AtomType* LocalPeriodicTable::name(const string& nm) const -{ - const AtomType* atp0; - try { - atp0 = this->_periodic_table->name(nm); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - const AtomType* atp = local_symbol(atp0->symbol); - return atp; -} - - -const AtomType* LocalPeriodicTable::symbol(const string& smbl) const -{ - const AtomType* atp = local_symbol(smbl); - return atp; -} - - -const AtomType* LocalPeriodicTable::lookup(const string& pat) const -{ - const AtomType* atp0; - try { - atp0 = this->_periodic_table->lookup(pat); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - const AtomType* atp = local_symbol(atp0->symbol); - return atp; -} - - -bool LocalPeriodicTable::has(const string& pat) const -{ - return this->_periodic_table->has(pat); -} - - -void LocalPeriodicTable::reset(const string& smbl) -{ - const AtomType* atp0; - try { - atp0 = this->_periodic_table->symbol(smbl); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - // overwrite with default only when smbl is in the local table - if (this->_local_table.count(smbl)) - { - this->_local_table[smbl] = *atp0; - } -} - - -void LocalPeriodicTable::setXsf(const string& smbl, double xsf) -{ - AtomType* atp = this->local_symbol(smbl); - atp->xsf = xsf; -} - - -void LocalPeriodicTable::setNsf(const string& smbl, double nsf) -{ - AtomType* atp = this->local_symbol(smbl); - atp->nsf = nsf; -} - - -// private methods - - -AtomType* LocalPeriodicTable::local_symbol(const string& smbl) const -{ - map::iterator atplocal; - atplocal = this->_local_table.find(smbl); - if (atplocal == this->_local_table.end()) - { - const AtomType* atp0; - try { - atp0 = this->_periodic_table->symbol(smbl); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - atplocal = this->_local_table.insert(make_pair(smbl, *atp0)).first; - } - AtomType* atp = &(atplocal->second); - return atp; -} - - -// End of file diff --git a/src/extensions/libpdffit2/LocalPeriodicTable.h b/src/extensions/libpdffit2/LocalPeriodicTable.h deleted file mode 100644 index 551faee5..00000000 --- a/src/extensions/libpdffit2/LocalPeriodicTable.h +++ /dev/null @@ -1,63 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2008 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class LocalPeriodicTable -* -* Comments: Light-weight class which allows redefinitions of scattering -* factors. It keeps a local copy of each looked up species, -* which can be redefined. -* This class also throws ValueError for unknown elements. -* -***********************************************************************/ - -#ifndef LOCALPERIODICTABLE_H_INCLUDED -#define LOCALPERIODICTABLE_H_INCLUDED - -#include -#include -#include "PeriodicTable.h" - -class LocalPeriodicTable -{ - public: - - // class methods - - // common instance for clients that do not need to own one - static const LocalPeriodicTable* instance(); - - // constructor - LocalPeriodicTable(); - - // methods - const AtomType* name(const std::string& nm) const; - const AtomType* symbol(const std::string& smbl) const; - const AtomType* lookup(const std::string& pat) const; - bool has(const std::string& pat) const; - void reset(const std::string& smbl); - void setXsf(const std::string& smbl, double xsf); - void setNsf(const std::string& smbl, double nsf); - - private: - - // data - PeriodicTable* _periodic_table; - mutable std::map _local_table; - - // methods - AtomType* local_symbol(const std::string& smbl) const; - -}; - -#endif // LOCALPERIODICTABLE_H_INCLUDED diff --git a/src/extensions/libpdffit2/MathUtils.h b/src/extensions/libpdffit2/MathUtils.h deleted file mode 100644 index 21240276..00000000 --- a/src/extensions/libpdffit2/MathUtils.h +++ /dev/null @@ -1,94 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2007 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Math functions and numerical constants for pdffit2 and formula parser. -* -* Comments: -* -***********************************************************************/ - -#ifndef MATHUTILS_H_INCLUDED -#define MATHUTILS_H_INCLUDED - -#include -#include - -// numerical constants -const double rad = M_PI/180.0; -const double double_eps = (1.0 + sqrt(std::numeric_limits().epsilon())) - 1.0; -const double double_max = std::numeric_limits().max(); -const double deltar_tol = 1.0e-3; - -// MS compatibility fix - define functions not provided by MSVC cmath -#ifdef _MSC_VER -#include - -#if _MSC_VER < 1800 // log2 has been available since MSVC 2013 -inline double log2(double x) { return log(x)/log(2.0); } -#endif - -inline int isnan(double x) { return _isnan(x); } -inline double round(double x) { return (x < 0) ? ceil(x - 0.5) : floor(x + 0.5); } - -#endif // _MSC_VER - -// nearest integer -inline int nint(const double x) -{ - return (int) round(x); -} - -// math functions and derivatives used in formula parser - -inline double neg(double x) { return -x; } -inline double dneg(double x) { return -1.0; } - -inline double sqr(double x) { return x*x; } -inline double dsqr(double x) { return 2.0*x; } - -inline double cube(double x) { return x*x*x; } -inline double dcube(double x) { return 3.0*sqr(x); } - -inline double dsqrt(double x) { return 0.5/sqrt(x); } - -inline double dexp(double x) { return exp(x); } -inline double dlog(double x) { return 1.0/x; } - -inline double sind(double x) { return sin(rad*x); } -inline double dsind(double x) { return rad*cos(rad*x); } - -inline double cosd(double x) { return cos(rad*x); } -inline double dcosd(double x) { return -rad*sin(rad*x); } - -inline double tand(double x) { return tan(rad*x); } -inline double dtand(double x) { return rad/sqr(cosd(x)); } - -inline double dsin(double x) { return cos(x); } -inline double dcos(double x) { return -sin(x); } -inline double dtan(double x) { return 1.0/sqr(cos(x)); } - -inline double dasin(double x) { return 1.0/sqrt(1.0 - x*x); } -inline double dacos(double x) { return -1.0/sqrt(1.0 - x*x); } -inline double datan(double x) { return 1/(1+sqr(x)); } - -inline double asind(double x) { return asin(x)/rad; } -inline double dasind(double x) { return dasin(x)/rad; } - -inline double acosd(double x) { return acos(x)/rad; } -inline double dacosd(double x) { return dacos(x)/rad; } - -inline double atand(double x) { return atan(x)/rad; } -inline double datand(double x) { return datan(x)/rad; } - -#endif // MATHUTILS_H_INCLUDED diff --git a/src/extensions/libpdffit2/OutputStreams.cc b/src/extensions/libpdffit2/OutputStreams.cc deleted file mode 100644 index 6bacc8c1..00000000 --- a/src/extensions/libpdffit2/OutputStreams.cc +++ /dev/null @@ -1,24 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Custom output and error streams. -* -***********************************************************************/ - -#include "OutputStreams.h" - -std::ostream* NS_PDFFIT2::pout = &std::cout; -std::ostream* NS_PDFFIT2::perr = &std::cerr; - -// End of file diff --git a/src/extensions/libpdffit2/OutputStreams.h b/src/extensions/libpdffit2/OutputStreams.h deleted file mode 100644 index d269b6b3..00000000 --- a/src/extensions/libpdffit2/OutputStreams.h +++ /dev/null @@ -1,31 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Custom output and error streams. -* -***********************************************************************/ - -#ifndef OUTPUTSTREAMS_H_INCLUDED -#define OUTPUTSTREAMS_H_INCLUDED - -#include - -namespace NS_PDFFIT2 { - -extern std::ostream* pout; -extern std::ostream* perr; - -} - -#endif // OUTPUTSTREAMS_H_INCLUDED diff --git a/src/extensions/libpdffit2/PairDistance.h b/src/extensions/libpdffit2/PairDistance.h deleted file mode 100644 index 92c375f3..00000000 --- a/src/extensions/libpdffit2/PairDistance.h +++ /dev/null @@ -1,42 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Simple struct for pair distance and indices of atoms in the pair -* -***********************************************************************/ - -#ifndef PAIRDISTANCE_H_INCLUDED -#define PAIRDISTANCE_H_INCLUDED - -struct PairDistance -{ - // Data members - double dij; // distance - double ddij; // standard deviation - int i; // first index based from 1 - int j; // second index based from 1 - - // Constructor - PairDistance() : dij(0.0), ddij(0.0), i(0), j(0) - { } - -}; - -// Comparison operator -inline bool operator<(const PairDistance& pd0, const PairDistance& pd1) -{ - return (pd0.dij < pd1.dij); -} - -#endif // PAIRDISTANCE_H_INCLUDED diff --git a/src/extensions/libpdffit2/PeriodicTable.cc b/src/extensions/libpdffit2/PeriodicTable.cc deleted file mode 100644 index dd1b4481..00000000 --- a/src/extensions/libpdffit2/PeriodicTable.cc +++ /dev/null @@ -1,3459 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class PeriodicTable -* -* Comments: singleton class, use PeriodicTable::instance() -* for its pointer -* -***********************************************************************/ - -#include -#include -#include - -// MS compatibility fix -#include - -#include "PeriodicTable.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////// -// helper function -//////////////////////////////////////////////////////////////////////// -namespace { - -inline bool isalphachar(const char& c) -{ - return isalpha(c); -} - -} // namespace - -//////////////////////////////////////////////////////////////////////// -// PeriodicTable definitions -//////////////////////////////////////////////////////////////////////// - -PeriodicTable::PeriodicTable() -{ - init(); -} - -PeriodicTable::~PeriodicTable() -{ - clear(); -} - -AtomType* PeriodicTable::name(const string& s) -{ - map::iterator ii; - ii = name_index.find(s); - if (ii == name_index.end()) - { - ostringstream emsg; - emsg << "Element or isotope '" << s << "' is not defined."; - throw runtime_error(emsg.str()); - } - return ii->second; -} - -AtomType* PeriodicTable::symbol(const string& s) -{ - map::iterator ii; - ii = symbol_index.find(s); - if (ii == symbol_index.end()) - { - ostringstream emsg; - emsg << "Element or isotope '" << s << "' is not defined."; - throw runtime_error(emsg.str()); - } - return ii->second; -} - -AtomType* PeriodicTable::lookup(string s) -{ - // force standard case - string::iterator sii = find_if(s.begin(), s.end(), isalphachar); - if (sii != s.end()) - { - *sii = toupper(*sii); - for (sii++; sii != s.end(); ++sii) *sii = tolower(*sii); - } - map::iterator ii; - ii = symbol_index.find(s); - if ( ii == symbol_index.end() && - (ii = name_index.find(s)) == name_index.end() ) - { - ostringstream emsg; - emsg << "Element or isotope '" << s << "' is not defined."; - throw runtime_error(emsg.str()); - } - return ii->second; -} - -bool PeriodicTable::has(const std::string& s) -{ - bool rv; - try - { - lookup(s); - rv = true; - } - catch(runtime_error) - { - rv = false; - } - return rv; -} - -void PeriodicTable::defAtomType(const AtomType& atp) -{ - // check if already defined - if (symbol_index.count(atp.symbol)) - { - ostringstream emsg; - emsg << "Element symbol '" << atp.symbol - << "' already defined."; - throw runtime_error(emsg.str()); - } - if (name_index.count(atp.name)) - { - ostringstream emsg; - emsg << "Element name '" << atp.name - << "' already defined."; - throw runtime_error(emsg.str()); - } - // all should be fine here - pt_backup.push_back(new AtomType(atp)); - AtomType* newatp = new AtomType(atp); - pt_public.push_back(newatp); - symbol_index[newatp->symbol] = newatp; - name_index[newatp->name] = newatp; -} - -void PeriodicTable::deleteAtomType(const AtomType* atp) -{ - deque::iterator ii; - ii = find(pt_public.begin(), pt_public.end(), atp); - if (ii == pt_public.end()) return; - // here we need to free and remove atp related data - symbol_index.erase(atp->symbol); - name_index.erase(atp->name); - size_t idx = ii - pt_public.begin(); - delete pt_public[idx]; pt_public.erase(pt_public.begin() + idx); - delete pt_backup[idx]; pt_backup.erase(pt_backup.begin() + idx); -} - -void PeriodicTable::reset(AtomType* atp) -{ - deque::iterator ii; - if (!count(pt_backup.begin(), pt_backup.end(), atp)) - { - ostringstream emsg; - emsg << "Element '" << atp->symbol << "' is not defined."; - throw runtime_error(emsg.str()); - } - size_t idx = ii - pt_backup.begin(); - *(pt_public[idx]) = *(pt_backup[idx]); -} - -void PeriodicTable::resetAll() -{ - deque::iterator iipub = pt_public.begin(); - deque::iterator iibak = pt_backup.begin(); - for ( ; iipub != pt_public.end(); ++iipub, ++iibak) - { - **iipub = **iibak; - } -} - -void PeriodicTable::init() -{ - // load element data to pt_backup - fill_pt_backup(); - // make public copy and initialize lookup maps - pt_public.resize(pt_backup.size()); - // fill in lookup map - deque::iterator iipub = pt_public.begin(); - deque::iterator iibak = pt_backup.begin(); - for ( ; iipub != pt_public.end(); ++iipub, ++iibak) - { - *iipub = new AtomType(**iibak); - symbol_index[(*iipub)->symbol] = *iipub; - name_index[(*iipub)->name] = *iipub; - } - // add standard symbols for deuterium and tritium - symbol_index["2-H"] = lookup("D"); - symbol_index["3-H"] = lookup("T"); -} - -void PeriodicTable::clear() -{ - deque::iterator iipub = pt_public.begin(); - deque::iterator iibak = pt_backup.begin(); - for ( ; iipub != pt_public.end(); ++iipub, ++iibak) - { - delete *iipub; *iipub = NULL; - delete *iibak; *iibak = NULL; - } - pt_public.clear(); - pt_backup.clear(); -} - -void PeriodicTable::fill_pt_backup() -{ - // Refs: - // 1. Albert-Jose Dianoux, Gerry Lander, Neutron Data Booklet, - // Second Edition, ILL 2003 - // 2. ionic radii: http://www.fhi-berlin.mpg.de/th/balsac/balm.47.html - AtomType* atp; - AtomType* itp; - // hydrogen - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "H"; - atp->name = "Hydrogen"; - atp->z = 1; - atp->M = 1.007947; - atp->radius = 0.4350; - atp->xsf = 1.0; - atp->nsf = -3.7409; - // isotopes - // 1-hydrogen - itp = new AtomType(*atp); - itp->symbol = "1-H"; - itp->name = "1-Hydrogen"; - itp->isotope = true; - itp->M = 1.0078250321; - itp->nsf = -3.7423; - pt_backup.push_back(itp); - // deuterium - itp = new AtomType(*atp); - itp->symbol = "D"; - itp->name = "Deuterium"; - itp->isotope = true; - itp->M = 2.0141017780; - itp->nsf = 6.674; - pt_backup.push_back(itp); - // tritium - itp = new AtomType(*atp); - itp->symbol = "T"; - itp->name = "Tritium"; - itp->isotope = true; - itp->M = 3.0160492675; - itp->nsf = 4.792; - pt_backup.push_back(itp); - } - // helium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "He"; - atp->name = "Helium"; - atp->z = 2; - atp->M = 4.0026022; - atp->radius = 1.4000; - atp->xsf = 2.0; - atp->nsf = 3.263; - // isotopes - // 3-helium - itp = new AtomType(*atp); - itp->symbol = "3-He"; - itp->name = "3-Helium"; - itp->isotope = true; - itp->M = 3.0160293097; - itp->nsf = 5.74; - pt_backup.push_back(itp); - // 4-helium - itp = new AtomType(*atp); - itp->symbol = "4-He"; - itp->name = "4-Helium"; - itp->isotope = true; - itp->M = 4.0026032497; - itp->nsf = 3.26; - pt_backup.push_back(itp); - } - // lithium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Li"; - atp->name = "Lithium"; - atp->z = 3; - atp->M = 6.9412; - atp->radius = 1.5199; - atp->xsf = 3.0; - atp->nsf = -1.903; - // isotopes - // 6-lithium - itp = new AtomType(*atp); - itp->symbol = "6-Li"; - itp->name = "6-Lithium"; - itp->isotope = true; - itp->M = 6.0151223; - itp->nsf = 2.0; - pt_backup.push_back(itp); - // 7-lithium - itp = new AtomType(*atp); - itp->symbol = "7-Li"; - itp->name = "7-Lithium"; - itp->isotope = true; - itp->M = 7.0160040; - itp->nsf = -2.22; - pt_backup.push_back(itp); - } - // beryllium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Be"; - atp->name = "Beryllium"; - atp->z = 4; - atp->M = 9.0121823; - atp->radius = 1.1430; - atp->xsf = 4.0; - atp->nsf = 7.791; - } - // boron - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "B"; - atp->name = "Boron"; - atp->z = 5; - atp->M = 10.8117; - atp->radius = 0.9750; - atp->xsf = 5.0; - atp->nsf = 5.304; - // isotopes - // 10-boron - itp = new AtomType(*atp); - itp->symbol = "10-B"; - itp->name = "10-Boron"; - itp->isotope = true; - itp->M = 10.0129370; - itp->nsf = -0.2; - pt_backup.push_back(itp); - // 11-boron - itp = new AtomType(*atp); - itp->symbol = "11-B"; - itp->name = "11-Boron"; - itp->isotope = true; - itp->M = 11.0093055; - itp->nsf = 6.65; - pt_backup.push_back(itp); - } - // carbon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "C"; - atp->name = "Carbon"; - atp->z = 6; - atp->M = 12.01078; - atp->radius = 0.6550; - atp->xsf = 6.0; - atp->nsf = 6.648413; - // isotopes - // 12-carbon - itp = new AtomType(*atp); - itp->symbol = "12-C"; - itp->name = "12-Carbon"; - itp->isotope = true; - itp->M = 12.0; - itp->nsf = 6.6535; - pt_backup.push_back(itp); - // 13-carbon - itp = new AtomType(*atp); - itp->symbol = "13-C"; - itp->name = "13-Carbon"; - itp->isotope = true; - itp->M = 13.0033548378; - itp->nsf = 6.19; - pt_backup.push_back(itp); - } - // nitrogen - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "N"; - atp->name = "Nitrogen"; - atp->z = 7; - atp->M = 14.00672; - atp->radius = 0.7500; - atp->xsf = 7.0; - atp->nsf = 9.36; - // isotopes - // 14-nitrogen - itp = new AtomType(*atp); - itp->symbol = "14-N"; - itp->name = "14-Nitrogen"; - itp->isotope = true; - itp->M = 14.0030740052; - itp->nsf = 9.37; - pt_backup.push_back(itp); - // 15-nitrogen - itp = new AtomType(*atp); - itp->symbol = "15-N"; - itp->name = "15-Nitrogen"; - itp->isotope = true; - itp->M = 15.0001088984; - itp->nsf = 6.44; - pt_backup.push_back(itp); - } - // oxygen - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "O"; - atp->name = "Oxygen"; - atp->z = 8; - atp->M = 15.99943; - atp->radius = 0.7300; - atp->xsf = 8.0; - atp->nsf = 5.8054; - // isotopes - // 16-oxygen - itp = new AtomType(*atp); - itp->symbol = "16-O"; - itp->name = "16-Oxygen"; - itp->isotope = true; - itp->M = 15.9949146221; - itp->nsf = 5.805; - pt_backup.push_back(itp); - // 17-oxygen - itp = new AtomType(*atp); - itp->symbol = "17-O"; - itp->name = "17-Oxygen"; - itp->isotope = true; - itp->M = 16.99913150; - itp->nsf = 5.6; - pt_backup.push_back(itp); - // 18-oxygen - itp = new AtomType(*atp); - itp->symbol = "18-O"; - itp->name = "18-Oxygen"; - itp->isotope = true; - itp->M = 17.9991604; - itp->nsf = 5.84; - pt_backup.push_back(itp); - } - // fluorine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "F"; - atp->name = "Fluorine"; - atp->z = 9; - atp->M = 18.99840325; - atp->radius = 0.7200; - atp->xsf = 9.0; - atp->nsf = 5.65412; - } - // neon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ne"; - atp->name = "Neon"; - atp->z = 10; - atp->M = 20.17976; - atp->radius = 1.6000; - atp->xsf = 10.0; - atp->nsf = 4.5666; - // isotopes - // 20-neon - itp = new AtomType(*atp); - itp->symbol = "20-Ne"; - itp->name = "20-Neon"; - itp->isotope = true; - itp->M = 19.9924401759; - itp->nsf = 4.631; - pt_backup.push_back(itp); - // 21-neon - itp = new AtomType(*atp); - itp->symbol = "21-Ne"; - itp->name = "21-Neon"; - itp->isotope = true; - itp->M = 20.99384674; - itp->nsf = 6.66; - pt_backup.push_back(itp); - // 22-neon - itp = new AtomType(*atp); - itp->symbol = "22-Ne"; - itp->name = "22-Neon"; - itp->isotope = true; - itp->M = 21.99138551; - itp->nsf = 3.87; - pt_backup.push_back(itp); - } - // sodium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Na"; - atp->name = "Sodium"; - atp->z = 11; - atp->M = 22.9897702; - atp->radius = 1.8579; - atp->xsf = 11.0; - atp->nsf = 3.632; - } - // magnesium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mg"; - atp->name = "Magnesium"; - atp->z = 12; - atp->M = 24.30506; - atp->radius = 1.6047; - atp->xsf = 12.0; - atp->nsf = 5.3754; - // isotopes - // 24-magnesium - itp = new AtomType(*atp); - itp->symbol = "24-Mg"; - itp->name = "24-Magnesium"; - itp->isotope = true; - itp->M = 23.98504190; - itp->nsf = 5.49; - pt_backup.push_back(itp); - // 25-magnesium - itp = new AtomType(*atp); - itp->symbol = "25-Mg"; - itp->name = "25-Magnesium"; - itp->isotope = true; - itp->M = 24.98583702; - itp->nsf = 3.62; - pt_backup.push_back(itp); - // 26-magnesium - itp = new AtomType(*atp); - itp->symbol = "26-Mg"; - itp->name = "26-Magnesium"; - itp->isotope = true; - itp->M = 25.98259304; - itp->nsf = 4.89; - pt_backup.push_back(itp); - } - // aluminium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Al"; - atp->name = "Aluminium"; - atp->z = 13; - atp->M = 26.9815382; - atp->radius = 1.4318; - atp->xsf = 13.0; - atp->nsf = 3.4495; - } - // silicon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Si"; - atp->name = "Silicon"; - atp->z = 14; - atp->M = 28.08553; - atp->radius = 1.1758; - atp->xsf = 14.0; - atp->nsf = 4.15071; - // isotopes - // 28-silicon - itp = new AtomType(*atp); - itp->symbol = "28-Si"; - itp->name = "28-Silicon"; - itp->isotope = true; - itp->M = 27.9769265327; - itp->nsf = 4.106; - pt_backup.push_back(itp); - // 29-silicon - itp = new AtomType(*atp); - itp->symbol = "29-Si"; - itp->name = "29-Silicon"; - itp->isotope = true; - itp->M = 28.97649472; - itp->nsf = 4.7; - pt_backup.push_back(itp); - // 30-silicon - itp = new AtomType(*atp); - itp->symbol = "30-Si"; - itp->name = "30-Silicon"; - itp->isotope = true; - itp->M = 29.97377022; - itp->nsf = 4.58; - pt_backup.push_back(itp); - } - // phosphorus - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "P"; - atp->name = "Phosphorus"; - atp->z = 15; - atp->M = 30.9737612; - atp->radius = 1.0600; - atp->xsf = 15.0; - atp->nsf = 5.131; - } - // sulfur - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "S"; - atp->name = "Sulfur"; - atp->z = 16; - atp->M = 32.0655; - atp->radius = 1.0200; - atp->xsf = 16.0; - atp->nsf = 2.8471; - // isotopes - // 32-sulfur - itp = new AtomType(*atp); - itp->symbol = "32-S"; - itp->name = "32-Sulfur"; - itp->isotope = true; - itp->M = 31.97207069; - itp->nsf = 2.804; - pt_backup.push_back(itp); - // 33-sulfur - itp = new AtomType(*atp); - itp->symbol = "33-S"; - itp->name = "33-Sulfur"; - itp->isotope = true; - itp->M = 32.97145850; - itp->nsf = 4.74; - pt_backup.push_back(itp); - // 34-sulfur - itp = new AtomType(*atp); - itp->symbol = "34-S"; - itp->name = "34-Sulfur"; - itp->isotope = true; - itp->M = 33.96786683; - itp->nsf = 3.48; - pt_backup.push_back(itp); - // 36-sulfur - itp = new AtomType(*atp); - itp->symbol = "36-S"; - itp->name = "36-Sulfur"; - itp->isotope = true; - itp->M = 35.96708088; - itp->nsf = 3.0; - pt_backup.push_back(itp); - } - // chlorine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cl"; - atp->name = "Chlorine"; - atp->z = 17; - atp->M = 35.4532; - atp->radius = 0.9900; - atp->xsf = 17.0; - atp->nsf = 9.57928; - // isotopes - // 35-chlorine - itp = new AtomType(*atp); - itp->symbol = "35-Cl"; - itp->name = "35-Chlorine"; - itp->isotope = true; - itp->M = 34.96885271; - itp->nsf = 11.7; - pt_backup.push_back(itp); - // 37-chlorine - itp = new AtomType(*atp); - itp->symbol = "37-Cl"; - itp->name = "37-Chlorine"; - itp->isotope = true; - itp->M = 36.96590260; - itp->nsf = 3.08; - pt_backup.push_back(itp); - } - // argon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ar"; - atp->name = "Argon"; - atp->z = 18; - atp->M = 39.9481; - atp->radius = 1.9000; - atp->xsf = 18.0; - atp->nsf = 1.9096; - // isotopes - // 36-argon - itp = new AtomType(*atp); - itp->symbol = "36-Ar"; - itp->name = "36-Argon"; - itp->isotope = true; - itp->M = 35.96754628; - itp->nsf = 24.9; - pt_backup.push_back(itp); - // 38-argon - itp = new AtomType(*atp); - itp->symbol = "38-Ar"; - itp->name = "38-Argon"; - itp->isotope = true; - itp->M = 37.9627322; - itp->nsf = 3.5; - pt_backup.push_back(itp); - // 40-argon - itp = new AtomType(*atp); - itp->symbol = "40-Ar"; - itp->name = "40-Argon"; - itp->isotope = true; - itp->M = 39.962383123; - itp->nsf = 1.7; - pt_backup.push_back(itp); - } - // potassium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "K"; - atp->name = "Potassium"; - atp->z = 19; - atp->M = 39.09831; - atp->radius = 2.2620; - atp->xsf = 19.0; - atp->nsf = 3.672; - // isotopes - // 39-potassium - itp = new AtomType(*atp); - itp->symbol = "39-K"; - itp->name = "39-Potassium"; - itp->isotope = true; - itp->M = 38.9637069; - itp->nsf = 3.79; - pt_backup.push_back(itp); - // 40-potassium - itp = new AtomType(*atp); - itp->symbol = "40-K"; - itp->name = "40-Potassium"; - itp->isotope = true; - itp->M = 39.96399867; - itp->nsf = 3.1; - pt_backup.push_back(itp); - // 41-potassium - itp = new AtomType(*atp); - itp->symbol = "41-K"; - itp->name = "41-Potassium"; - itp->isotope = true; - itp->M = 40.96182597; - itp->nsf = 2.69; - pt_backup.push_back(itp); - } - // calcium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ca"; - atp->name = "Calcium"; - atp->z = 20; - atp->M = 40.0784; - atp->radius = 1.9758; - atp->xsf = 20.0; - atp->nsf = 4.702; - // isotopes - // 40-calcium - itp = new AtomType(*atp); - itp->symbol = "40-Ca"; - itp->name = "40-Calcium"; - itp->isotope = true; - itp->M = 39.9625912; - itp->nsf = 4.78; - pt_backup.push_back(itp); - // 42-calcium - itp = new AtomType(*atp); - itp->symbol = "42-Ca"; - itp->name = "42-Calcium"; - itp->isotope = true; - itp->M = 41.9586183; - itp->nsf = 3.36; - pt_backup.push_back(itp); - // 43-calcium - itp = new AtomType(*atp); - itp->symbol = "43-Ca"; - itp->name = "43-Calcium"; - itp->isotope = true; - itp->M = 42.9587668; - itp->nsf = -1.56; - pt_backup.push_back(itp); - // 44-calcium - itp = new AtomType(*atp); - itp->symbol = "44-Ca"; - itp->name = "44-Calcium"; - itp->isotope = true; - itp->M = 43.9554811; - itp->nsf = 1.42; - pt_backup.push_back(itp); - // 46-calcium - itp = new AtomType(*atp); - itp->symbol = "46-Ca"; - itp->name = "46-Calcium"; - itp->isotope = true; - itp->M = 45.9536928; - itp->nsf = 3.55; - pt_backup.push_back(itp); - // 48-calcium - itp = new AtomType(*atp); - itp->symbol = "48-Ca"; - itp->name = "48-Calcium"; - itp->isotope = true; - itp->M = 47.952534; - itp->nsf = 0.39; - pt_backup.push_back(itp); - } - // scandium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sc"; - atp->name = "Scandium"; - atp->z = 21; - atp->M = 44.9559108; - atp->radius = 1.6545; - atp->xsf = 21.0; - atp->nsf = 12.11; - } - // titanium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ti"; - atp->name = "Titanium"; - atp->z = 22; - atp->M = 47.8671; - atp->radius = 1.4755; - atp->xsf = 22.0; - atp->nsf = -3.37013; - // isotopes - // 46-titanium - itp = new AtomType(*atp); - itp->symbol = "46-Ti"; - itp->name = "46-Titanium"; - itp->isotope = true; - itp->M = 45.9526295; - itp->nsf = 4.72; - pt_backup.push_back(itp); - // 47-titanium - itp = new AtomType(*atp); - itp->symbol = "47-Ti"; - itp->name = "47-Titanium"; - itp->isotope = true; - itp->M = 46.9517638; - itp->nsf = 3.53; - pt_backup.push_back(itp); - // 48-titanium - itp = new AtomType(*atp); - itp->symbol = "48-Ti"; - itp->name = "48-Titanium"; - itp->isotope = true; - itp->M = 47.9479471; - itp->nsf = -5.86; - pt_backup.push_back(itp); - // 49-titanium - itp = new AtomType(*atp); - itp->symbol = "49-Ti"; - itp->name = "49-Titanium"; - itp->isotope = true; - itp->M = 48.9478708; - itp->nsf = 0.98; - pt_backup.push_back(itp); - // 50-titanium - itp = new AtomType(*atp); - itp->symbol = "50-Ti"; - itp->name = "50-Titanium"; - itp->isotope = true; - itp->M = 49.9447921; - itp->nsf = 5.88; - pt_backup.push_back(itp); - } - // vanadium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "V"; - atp->name = "Vanadium"; - atp->z = 23; - atp->M = 50.94151; - atp->radius = 1.3090; - atp->xsf = 23.0; - atp->nsf = -0.44314; - // isotopes - // 50-vanadium - itp = new AtomType(*atp); - itp->symbol = "50-V"; - itp->name = "50-Vanadium"; - itp->isotope = true; - itp->M = 49.9471628; - itp->nsf = 7.6; - pt_backup.push_back(itp); - // 51-vanadium - itp = new AtomType(*atp); - itp->symbol = "51-V"; - itp->name = "51-Vanadium"; - itp->isotope = true; - itp->M = 50.9439637; - itp->nsf = -0.402; - pt_backup.push_back(itp); - } - // chromium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cr"; - atp->name = "Chromium"; - atp->z = 24; - atp->M = 51.99616; - atp->radius = 1.2490; - atp->xsf = 24.0; - atp->nsf = 3.6357; - // isotopes - // 50-chromium - itp = new AtomType(*atp); - itp->symbol = "50-Cr"; - itp->name = "50-Chromium"; - itp->isotope = true; - itp->M = 49.9460496; - itp->nsf = -4.50; - pt_backup.push_back(itp); - // 52-chromium - itp = new AtomType(*atp); - itp->symbol = "52-Cr"; - itp->name = "52-Chromium"; - itp->isotope = true; - itp->M = 51.9405119; - itp->nsf = 4.914; - pt_backup.push_back(itp); - // 0-chromium - itp = new AtomType(*atp); - itp->symbol = "53-Cr"; - itp->name = "53-Chromium"; - itp->isotope = true; - itp->M = 52.9406538; - itp->nsf = -4.20; - pt_backup.push_back(itp); - // 54-chromium - itp = new AtomType(*atp); - itp->symbol = "54-Cr"; - itp->name = "54-Chromium"; - itp->isotope = true; - itp->M = 53.9388849; - itp->nsf = 4.55; - pt_backup.push_back(itp); - } - // manganese - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mn"; - atp->name = "Manganese"; - atp->z = 25; - atp->M = 54.9380499; - atp->radius = 1.3500; - atp->xsf = 25.0; - atp->nsf = -3.75018; - } - // iron - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Fe"; - atp->name = "Iron"; - atp->z = 26; - atp->M = 55.8452; - atp->radius = 1.2411; - atp->xsf = 26.0; - atp->nsf = 9.452; - // isotopes - // 54-iron - itp = new AtomType(*atp); - itp->symbol = "54-Fe"; - itp->name = "54-Iron"; - itp->isotope = true; - itp->M = 53.9396148; - itp->nsf = 4.2; - pt_backup.push_back(itp); - // 56-iron - itp = new AtomType(*atp); - itp->symbol = "56-Fe"; - itp->name = "56-Iron"; - itp->isotope = true; - itp->M = 55.9349421; - itp->nsf = 10.1; - pt_backup.push_back(itp); - // 57-iron - itp = new AtomType(*atp); - itp->symbol = "57-Fe"; - itp->name = "57-Iron"; - itp->isotope = true; - itp->M = 56.9353987; - itp->nsf = 2.3; - pt_backup.push_back(itp); - // 58-iron - itp = new AtomType(*atp); - itp->symbol = "58-Fe"; - itp->name = "58-Iron"; - itp->isotope = true; - itp->M = 57.9332805; - itp->nsf = 15; - pt_backup.push_back(itp); - } - // cobalt - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Co"; - atp->name = "Cobalt"; - atp->z = 27; - atp->M = 58.9332009; - atp->radius = 1.2535; - atp->xsf = 27.0; - atp->nsf = 2.492; - } - // nickel - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ni"; - atp->name = "Nickel"; - atp->z = 28; - atp->M = 58.69342; - atp->radius = 1.2460; - atp->xsf = 28.0; - atp->nsf = 10.31; - // isotopes - // 58-nickel - itp = new AtomType(*atp); - itp->symbol = "58-Ni"; - itp->name = "58-Nickel"; - itp->isotope = true; - itp->M = 57.9353479; - itp->nsf = 14.4; - pt_backup.push_back(itp); - // 60-nickel - itp = new AtomType(*atp); - itp->symbol = "60-Ni"; - itp->name = "60-Nickel"; - itp->isotope = true; - itp->M = 59.9307906; - itp->nsf = 2.8; - pt_backup.push_back(itp); - // 61-nickel - itp = new AtomType(*atp); - itp->symbol = "61-Ni"; - itp->name = "61-Nickel"; - itp->isotope = true; - itp->M = 60.9310604; - itp->nsf = 7.60; - pt_backup.push_back(itp); - // 62-nickel - itp = new AtomType(*atp); - itp->symbol = "62-Ni"; - itp->name = "62-Nickel"; - itp->isotope = true; - itp->M = 61.9283488; - itp->nsf = -8.7; - pt_backup.push_back(itp); - // 64-nickel - itp = new AtomType(*atp); - itp->symbol = "64-Ni"; - itp->name = "64-Nickel"; - itp->isotope = true; - itp->M = 63.9279696; - itp->nsf = -0.37; - pt_backup.push_back(itp); - } - // copper - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cu"; - atp->name = "Copper"; - atp->z = 29; - atp->M = 63.5463; - atp->radius = 1.2780; - atp->xsf = 29.0; - atp->nsf = 7.7184; - // isotopes - // 63-copper - itp = new AtomType(*atp); - itp->symbol = "63-Cu"; - itp->name = "63-Copper"; - itp->isotope = true; - itp->M = 62.9296011; - itp->nsf = 6.477; - pt_backup.push_back(itp); - // 65-copper - itp = new AtomType(*atp); - itp->symbol = "65-Cu"; - itp->name = "65-Copper"; - itp->isotope = true; - itp->M = 64.9277937; - itp->nsf = 10.204; - pt_backup.push_back(itp); - } - // zinc - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Zn"; - atp->name = "Zinc"; - atp->z = 30; - atp->M = 65.4094; - atp->radius = 1.3325; - atp->xsf = 30.0; - atp->nsf = 5.6805; - // isotopes - // 64-zinc - itp = new AtomType(*atp); - itp->symbol = "64-Zn"; - itp->name = "64-Zinc"; - itp->isotope = true; - itp->M = 63.9291466; - itp->nsf = 5.23; - pt_backup.push_back(itp); - // 66-zinc - itp = new AtomType(*atp); - itp->symbol = "66-Zn"; - itp->name = "66-Zinc"; - itp->isotope = true; - itp->M = 65.9260368; - itp->nsf = 5.98; - pt_backup.push_back(itp); - // 67-zinc - itp = new AtomType(*atp); - itp->symbol = "67-Zn"; - itp->name = "67-Zinc"; - itp->isotope = true; - itp->M = 66.9271309; - itp->nsf = 7.58; - pt_backup.push_back(itp); - // 68-zinc - itp = new AtomType(*atp); - itp->symbol = "68-Zn"; - itp->name = "68-Zinc"; - itp->isotope = true; - itp->M = 67.9248476; - itp->nsf = 6.04; - pt_backup.push_back(itp); - // 70-zinc - itp = new AtomType(*atp); - itp->symbol = "70-Zn"; - itp->name = "70-Zinc"; - itp->isotope = true; - itp->M = 69.925325; - itp->nsf = 6.9; - pt_backup.push_back(itp); - } - // gallium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ga"; - atp->name = "Gallium"; - atp->z = 31; - atp->M = 69.7231; - atp->radius = 1.3501; - atp->xsf = 31.0; - atp->nsf = 7.2882; - // isotopes - // 69-gallium - itp = new AtomType(*atp); - itp->symbol = "69-Ga"; - itp->name = "69-Gallium"; - itp->isotope = true; - itp->M = 68.925581; - itp->nsf = 8.043; - pt_backup.push_back(itp); - // 71-gallium - itp = new AtomType(*atp); - itp->symbol = "71-Ga"; - itp->name = "71-Gallium"; - itp->isotope = true; - itp->M = 70.9247050; - itp->nsf = 6.170; - pt_backup.push_back(itp); - } - // germanium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ge"; - atp->name = "Germanium"; - atp->z = 32; - atp->M = 72.641; - atp->radius = 1.2248; - atp->xsf = 32.0; - atp->nsf = 8.18520; - // isotopes - // 70-germanium - itp = new AtomType(*atp); - itp->symbol = "70-Ge"; - itp->name = "70-Germanium"; - itp->isotope = true; - itp->M = 69.9242504; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 72-germanium - itp = new AtomType(*atp); - itp->symbol = "72-Ge"; - itp->name = "72-Germanium"; - itp->isotope = true; - itp->M = 71.9220762; - itp->nsf = 8.51; - pt_backup.push_back(itp); - // 73-germanium - itp = new AtomType(*atp); - itp->symbol = "73-Ge"; - itp->name = "73-Germanium"; - itp->isotope = true; - itp->M = 72.9234594; - itp->nsf = 5.02; - pt_backup.push_back(itp); - // 74-germanium - itp = new AtomType(*atp); - itp->symbol = "74-Ge"; - itp->name = "74-Germanium"; - itp->isotope = true; - itp->M = 73.9211782; - itp->nsf = 7.58; - pt_backup.push_back(itp); - // 76-germanium - itp = new AtomType(*atp); - itp->symbol = "76-Ge"; - itp->name = "76-Germanium"; - itp->isotope = true; - itp->M = 75.9214027; - itp->nsf = 8.2; - pt_backup.push_back(itp); - } - // arsenic - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "As"; - atp->name = "Arsenic"; - atp->z = 33; - atp->M = 74.921602; - atp->radius = 1.2000; - atp->xsf = 33.0; - atp->nsf = 6.581; - } - // selenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Se"; - atp->name = "Selenium"; - atp->z = 34; - atp->M = 78.963; - atp->radius = 1.1600; - atp->xsf = 34.0; - atp->nsf = 7.9709; - // isotopes - // 74-selenium - itp = new AtomType(*atp); - itp->symbol = "74-Se"; - itp->name = "74-Selenium"; - itp->isotope = true; - itp->M = 73.9224766; - itp->nsf = 0.8; - pt_backup.push_back(itp); - // 76-selenium - itp = new AtomType(*atp); - itp->symbol = "76-Se"; - itp->name = "76-Selenium"; - itp->isotope = true; - itp->M = 75.9192141; - itp->nsf = 12.2; - pt_backup.push_back(itp); - // 77-selenium - itp = new AtomType(*atp); - itp->symbol = "77-Se"; - itp->name = "77-Selenium"; - itp->isotope = true; - itp->M = 76.9199146; - itp->nsf = 8.25; - pt_backup.push_back(itp); - // 78-selenium - itp = new AtomType(*atp); - itp->symbol = "78-Se"; - itp->name = "78-Selenium"; - itp->isotope = true; - itp->M = 77.9173095; - itp->nsf = 8.24; - pt_backup.push_back(itp); - // 80-selenium - itp = new AtomType(*atp); - itp->symbol = "80-Se"; - itp->name = "80-Selenium"; - itp->isotope = true; - itp->M = 79.9165218; - itp->nsf = 7.48; - pt_backup.push_back(itp); - // 82-selenium - itp = new AtomType(*atp); - itp->symbol = "82-Se"; - itp->name = "82-Selenium"; - itp->isotope = true; - itp->M = 81.9167000; - itp->nsf = 6.34; - pt_backup.push_back(itp); - } - // bromine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Br"; - atp->name = "Bromine"; - atp->z = 35; - atp->M = 79.9041; - atp->radius = 1.1400; - atp->xsf = 35.0; - atp->nsf = 6.792; - // isotopes - // 79-bromine - itp = new AtomType(*atp); - itp->symbol = "79-Br"; - itp->name = "79-Bromine"; - itp->isotope = true; - itp->M = 78.9183376; - itp->nsf = 6.79; - pt_backup.push_back(itp); - // 81-bromine - itp = new AtomType(*atp); - itp->symbol = "81-Br"; - itp->name = "81-Bromine"; - itp->isotope = true; - itp->M = 80.916291; - itp->nsf = 6.78; - pt_backup.push_back(itp); - } - // krypton - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Kr"; - atp->name = "Krypton"; - atp->z = 36; - atp->M = 83.7982; - atp->radius = 2.0000; - atp->xsf = 36.0; - atp->nsf = 7.812; - // isotopes - // 86-krypton - itp = new AtomType(*atp); - itp->symbol = "86-Kr"; - itp->name = "86-Krypton"; - itp->isotope = true; - itp->M = 85.9106103; - itp->nsf = 8.07; - pt_backup.push_back(itp); - } - // rubidium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rb"; - atp->name = "Rubidium"; - atp->z = 37; - atp->M = 85.46783; - atp->radius = 2.4700; - atp->xsf = 37.0; - atp->nsf = 7.082; - // isotopes - // 85-rubidium - itp = new AtomType(*atp); - itp->symbol = "85-Rb"; - itp->name = "85-Rubidium"; - itp->isotope = true; - itp->M = 84.9117893; - itp->nsf = 7.07; - pt_backup.push_back(itp); - // 87-rubidium - itp = new AtomType(*atp); - itp->symbol = "87-Rb"; - itp->name = "87-Rubidium"; - itp->isotope = true; - itp->M = 86.9091835; - itp->nsf = 7.27; - pt_backup.push_back(itp); - } - // strontium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sr"; - atp->name = "Strontium"; - atp->z = 38; - atp->M = 87.621; - atp->radius = 2.1513; - atp->xsf = 38.0; - atp->nsf = 7.022; - // isotopes - // 84-strontium - itp = new AtomType(*atp); - itp->symbol = "84-Sr"; - itp->name = "84-Strontium"; - itp->isotope = true; - itp->M = 83.913425; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 86-strontium - itp = new AtomType(*atp); - itp->symbol = "86-Sr"; - itp->name = "86-Strontium"; - itp->isotope = true; - itp->M = 85.9092624; - itp->nsf = 5.68; - pt_backup.push_back(itp); - // 87-strontium - itp = new AtomType(*atp); - itp->symbol = "87-Sr"; - itp->name = "87-Strontium"; - itp->isotope = true; - itp->M = 86.9088793; - itp->nsf = 7.41; - pt_backup.push_back(itp); - // 88-strontium - itp = new AtomType(*atp); - itp->symbol = "88-Sr"; - itp->name = "88-Strontium"; - itp->isotope = true; - itp->M = 87.9056143; - itp->nsf = 7.16; - pt_backup.push_back(itp); - } - // yttrium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Y"; - atp->name = "Yttrium"; - atp->z = 39; - atp->M = 88.905852; - atp->radius = 1.8237; - atp->xsf = 39.0; - atp->nsf = 7.752; - } - // zirconium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Zr"; - atp->name = "Zirconium"; - atp->z = 40; - atp->M = 91.2242; - atp->radius = 1.6156; - atp->xsf = 40.0; - atp->nsf = 7.163; - // isotopes - // 90-zirconium - itp = new AtomType(*atp); - itp->symbol = "90-Zr"; - itp->name = "90-Zirconium"; - itp->isotope = true; - itp->M = 89.9047037; - itp->nsf = 6.5; - pt_backup.push_back(itp); - // 91-zirconium - itp = new AtomType(*atp); - itp->symbol = "91-Zr"; - itp->name = "91-Zirconium"; - itp->isotope = true; - itp->M = 90.9056450; - itp->nsf = 8.8; - pt_backup.push_back(itp); - // 92-zirconium - itp = new AtomType(*atp); - itp->symbol = "92-Zr"; - itp->name = "92-Zirconium"; - itp->isotope = true; - itp->M = 91.9050401; - itp->nsf = 7.5; - pt_backup.push_back(itp); - // 94-zirconium - itp = new AtomType(*atp); - itp->symbol = "94-Zr"; - itp->name = "94-Zirconium"; - itp->isotope = true; - itp->M = 93.9063158; - itp->nsf = 8.3; - pt_backup.push_back(itp); - // 96-zirconium - itp = new AtomType(*atp); - itp->symbol = "96-Zr"; - itp->name = "96-Zirconium"; - itp->isotope = true; - itp->M = 95.908276; - itp->nsf = 5.5; - pt_backup.push_back(itp); - } - // niobium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Nb"; - atp->name = "Niobium"; - atp->z = 41; - atp->M = 92.906382; - atp->radius = 1.4318; - atp->xsf = 41.0; - atp->nsf = 7.0543; - } - // molybdenum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mo"; - atp->name = "Molybdenum"; - atp->z = 42; - atp->M = 95.942; - atp->radius = 1.3626; - atp->xsf = 42.0; - atp->nsf = 6.71520; - // isotopes - // 92-molybdenum - itp = new AtomType(*atp); - itp->symbol = "92-Mo"; - itp->name = "92-Molybdenum"; - itp->isotope = true; - itp->M = 91.906810; - itp->nsf = 6.93; - pt_backup.push_back(itp); - // 94-molybdenum - itp = new AtomType(*atp); - itp->symbol = "94-Mo"; - itp->name = "94-Molybdenum"; - itp->isotope = true; - itp->M = 93.9050876; - itp->nsf = 6.82; - pt_backup.push_back(itp); - // 95-molybdenum - itp = new AtomType(*atp); - itp->symbol = "95-Mo"; - itp->name = "95-Molybdenum"; - itp->isotope = true; - itp->M = 94.9058415; - itp->nsf = 6.93; - pt_backup.push_back(itp); - // 96-molybdenum - itp = new AtomType(*atp); - itp->symbol = "96-Mo"; - itp->name = "96-Molybdenum"; - itp->isotope = true; - itp->M = 95.9046789; - itp->nsf = 6.22; - pt_backup.push_back(itp); - // 97-molybdenum - itp = new AtomType(*atp); - itp->symbol = "97-Mo"; - itp->name = "97-Molybdenum"; - itp->isotope = true; - itp->M = 96.9060210; - itp->nsf = 7.26; - pt_backup.push_back(itp); - // 98-molybdenum - itp = new AtomType(*atp); - itp->symbol = "98-Mo"; - itp->name = "98-Molybdenum"; - itp->isotope = true; - itp->M = 97.9054078; - itp->nsf = 6.60; - pt_backup.push_back(itp); - // 100-molybdenum - itp = new AtomType(*atp); - itp->symbol = "100-Mo"; - itp->name = "100-Molybdenum"; - itp->isotope = true; - itp->M = 99.907477; - itp->nsf = 6.75; - pt_backup.push_back(itp); - } - // technetium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tc"; - atp->name = "Technetium"; - atp->z = 43; - atp->M = 98.0; - atp->radius = 1.3675; - atp->xsf = 43.0; - atp->nsf = 6.83; - } - // ruthenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ru"; - atp->name = "Ruthenium"; - atp->z = 44; - atp->M = 101.072; - atp->radius = 1.3529; - atp->xsf = 44.0; - atp->nsf = 7.022; - } - // rhodium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rh"; - atp->name = "Rhodium"; - atp->z = 45; - atp->M = 102.905502; - atp->radius = 1.3450; - atp->xsf = 45.0; - atp->nsf = 5.904; - } - // palladium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pd"; - atp->name = "Palladium"; - atp->z = 46; - atp->M = 106.421; - atp->radius = 1.3755; - atp->xsf = 46.0; - atp->nsf = 5.916; - // isotopes - // 102-palladium - itp = new AtomType(*atp); - itp->symbol = "102-Pd"; - itp->name = "102-Palladium"; - itp->isotope = true; - itp->M = 101.905608; - itp->nsf = 7.7; - pt_backup.push_back(itp); - // 104-palladium - itp = new AtomType(*atp); - itp->symbol = "104-Pd"; - itp->name = "104-Palladium"; - itp->isotope = true; - itp->M = 103.904035; - itp->nsf = 7.7; - pt_backup.push_back(itp); - // 105-palladium - itp = new AtomType(*atp); - itp->symbol = "105-Pd"; - itp->name = "105-Palladium"; - itp->isotope = true; - itp->M = 104.905084; - itp->nsf = 5.5; - pt_backup.push_back(itp); - // 106-palladium - itp = new AtomType(*atp); - itp->symbol = "106-Pd"; - itp->name = "106-Palladium"; - itp->isotope = true; - itp->M = 105.903483; - itp->nsf = 6.4; - pt_backup.push_back(itp); - // 108-palladium - itp = new AtomType(*atp); - itp->symbol = "108-Pd"; - itp->name = "108-Palladium"; - itp->isotope = true; - itp->M = 107.903894; - itp->nsf = 4.1; - pt_backup.push_back(itp); - // 110-palladium - itp = new AtomType(*atp); - itp->symbol = "110-Pd"; - itp->name = "110-Palladium"; - itp->isotope = true; - itp->M = 109.905152; - itp->nsf = 7.7; - pt_backup.push_back(itp); - } - // silver - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ag"; - atp->name = "Silver"; - atp->z = 47; - atp->M = 107.86822; - atp->radius = 1.4447; - atp->xsf = 47.0; - atp->nsf = 5.9227; - // isotopes - // 107-silver - itp = new AtomType(*atp); - itp->symbol = "107-Ag"; - itp->name = "107-Silver"; - itp->isotope = true; - itp->M = 106.905093; - itp->nsf = 7.555; - pt_backup.push_back(itp); - // 109-silver - itp = new AtomType(*atp); - itp->symbol = "109-Ag"; - itp->name = "109-Silver"; - itp->isotope = true; - itp->M = 108.904756; - itp->nsf = 4.165; - pt_backup.push_back(itp); - } - // cadmium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cd"; - atp->name = "Cadmium"; - atp->z = 48; - atp->M = 112.4118; - atp->radius = 1.4894; - atp->xsf = 48.0; - atp->nsf = 4.835; - // isotopes - // 106-cadmium - itp = new AtomType(*atp); - itp->symbol = "106-Cd"; - itp->name = "106-Cadmium"; - itp->isotope = true; - itp->M = 105.906458; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 108-cadmium - itp = new AtomType(*atp); - itp->symbol = "108-Cd"; - itp->name = "108-Cadmium"; - itp->isotope = true; - itp->M = 107.904183; - itp->nsf = 5.31; - pt_backup.push_back(itp); - // 110-cadmium - itp = new AtomType(*atp); - itp->symbol = "110-Cd"; - itp->name = "110-Cadmium"; - itp->isotope = true; - itp->M = 109.903006; - itp->nsf = 5.78; - pt_backup.push_back(itp); - // 111-cadmium - itp = new AtomType(*atp); - itp->symbol = "111-Cd"; - itp->name = "111-Cadmium"; - itp->isotope = true; - itp->M = 110.904182; - itp->nsf = 6.47; - pt_backup.push_back(itp); - // 112-cadmium - itp = new AtomType(*atp); - itp->symbol = "112-Cd"; - itp->name = "112-Cadmium"; - itp->isotope = true; - itp->M = 111.9027572; - itp->nsf = 6.34; - pt_backup.push_back(itp); - // 113-cadmium - itp = new AtomType(*atp); - itp->symbol = "113-Cd"; - itp->name = "113-Cadmium"; - itp->isotope = true; - itp->M = 112.9044009; - itp->nsf = -8.0; - pt_backup.push_back(itp); - // 114-cadmium - itp = new AtomType(*atp); - itp->symbol = "114-Cd"; - itp->name = "114-Cadmium"; - itp->isotope = true; - itp->M = 113.9033581; - itp->nsf = 7.48; - pt_backup.push_back(itp); - // 116-cadmium - itp = new AtomType(*atp); - itp->symbol = "116-Cd"; - itp->name = "116-Cadmium"; - itp->isotope = true; - itp->M = 115.904755; - itp->nsf = 6.26; - pt_backup.push_back(itp); - } - // indium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "In"; - atp->name = "Indium"; - atp->z = 49; - atp->M = 114.8183; - atp->radius = 1.6662; - atp->xsf = 49.0; - atp->nsf = 4.0652; - // isotopes - // 113-indium - itp = new AtomType(*atp); - itp->symbol = "113-In"; - itp->name = "113-Indium"; - itp->isotope = true; - itp->M = 112.904061; - itp->nsf = 5.39; - pt_backup.push_back(itp); - // 115-indium - itp = new AtomType(*atp); - itp->symbol = "115-In"; - itp->name = "115-Indium"; - itp->isotope = true; - itp->M = 114.903878; - itp->nsf = 4.00; - pt_backup.push_back(itp); - } - // tin - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sn"; - atp->name = "Tin"; - atp->z = 50; - atp->M = 118.7107; - atp->radius = 1.5375; - atp->xsf = 50.0; - atp->nsf = 6.2252; - // isotopes - // 112-tin - itp = new AtomType(*atp); - itp->symbol = "112-Sn"; - itp->name = "112-Tin"; - itp->isotope = true; - itp->M = 111.904821; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 114-tin - itp = new AtomType(*atp); - itp->symbol = "114-Sn"; - itp->name = "114-Tin"; - itp->isotope = true; - itp->M = 113.902782; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 115-tin - itp = new AtomType(*atp); - itp->symbol = "115-Sn"; - itp->name = "115-Tin"; - itp->isotope = true; - itp->M = 114.903346; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 116-tin - itp = new AtomType(*atp); - itp->symbol = "116-Sn"; - itp->name = "116-Tin"; - itp->isotope = true; - itp->M = 115.901744; - itp->nsf = 6.1; - pt_backup.push_back(itp); - // 117-tin - itp = new AtomType(*atp); - itp->symbol = "117-Sn"; - itp->name = "117-Tin"; - itp->isotope = true; - itp->M = 116.902954; - itp->nsf = 6.59; - pt_backup.push_back(itp); - // 118-tin - itp = new AtomType(*atp); - itp->symbol = "118-Sn"; - itp->name = "118-Tin"; - itp->isotope = true; - itp->M = 117.901606; - itp->nsf = 6.23; - pt_backup.push_back(itp); - // 119-tin - itp = new AtomType(*atp); - itp->symbol = "119-Sn"; - itp->name = "119-Tin"; - itp->isotope = true; - itp->M = 118.903309; - itp->nsf = 6.28; - pt_backup.push_back(itp); - // 120-tin - itp = new AtomType(*atp); - itp->symbol = "120-Sn"; - itp->name = "120-Tin"; - itp->isotope = true; - itp->M = 119.9021966; - itp->nsf = 6.67; - pt_backup.push_back(itp); - // 122-tin - itp = new AtomType(*atp); - itp->symbol = "122-Sn"; - itp->name = "122-Tin"; - itp->isotope = true; - itp->M = 121.9034401; - itp->nsf = 5.93; - pt_backup.push_back(itp); - // 124-tin - itp = new AtomType(*atp); - itp->symbol = "124-Sn"; - itp->name = "124-Tin"; - itp->isotope = true; - itp->M = 123.9052746; - itp->nsf = 6.15; - pt_backup.push_back(itp); - } - // antimony - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sb"; - atp->name = "Antimony"; - atp->z = 51; - atp->M = 121.7601; - atp->radius = 1.4000; - atp->xsf = 51.0; - atp->nsf = 5.573; - // isotopes - // 121-antimony - itp = new AtomType(*atp); - itp->symbol = "121-Sb"; - itp->name = "121-Antimony"; - itp->isotope = true; - itp->M = 120.9038180; - itp->nsf = 5.71; - pt_backup.push_back(itp); - // 123-antimony - itp = new AtomType(*atp); - itp->symbol = "123-Sb"; - itp->name = "123-Antimony"; - itp->isotope = true; - itp->M = 122.9042157; - itp->nsf = 5.38; - pt_backup.push_back(itp); - } - // tellurium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Te"; - atp->name = "Tellurium"; - atp->z = 52; - atp->M = 127.603; - atp->radius = 1.3600; - atp->xsf = 52.0; - atp->nsf = 5.682; - // isotopes - // 120-tellurium - itp = new AtomType(*atp); - itp->symbol = "120-Te"; - itp->name = "120-Tellurium"; - itp->isotope = true; - itp->M = 119.904020; - itp->nsf = 5.3; - pt_backup.push_back(itp); - // 122-tellurium - itp = new AtomType(*atp); - itp->symbol = "122-Te"; - itp->name = "122-Tellurium"; - itp->isotope = true; - itp->M = 121.9030471; - itp->nsf = 3.8; - pt_backup.push_back(itp); - // 123-tellurium - itp = new AtomType(*atp); - itp->symbol = "123-Te"; - itp->name = "123-Tellurium"; - itp->isotope = true; - itp->M = 122.9042730; - itp->nsf = -0.05; - pt_backup.push_back(itp); - // 124-tellurium - itp = new AtomType(*atp); - itp->symbol = "124-Te"; - itp->name = "124-Tellurium"; - itp->isotope = true; - itp->M = 123.9028195; - itp->nsf = 7.95; - pt_backup.push_back(itp); - // 125-tellurium - itp = new AtomType(*atp); - itp->symbol = "125-Te"; - itp->name = "125-Tellurium"; - itp->isotope = true; - itp->M = 124.9044247; - itp->nsf = 5.01; - pt_backup.push_back(itp); - // 126-tellurium - itp = new AtomType(*atp); - itp->symbol = "126-Te"; - itp->name = "126-Tellurium"; - itp->isotope = true; - itp->M = 125.9033055; - itp->nsf = 5.55; - pt_backup.push_back(itp); - // 128-tellurium - itp = new AtomType(*atp); - itp->symbol = "128-Te"; - itp->name = "128-Tellurium"; - itp->isotope = true; - itp->M = 127.9044614; - itp->nsf = 5.88; - pt_backup.push_back(itp); - // 130-tellurium - itp = new AtomType(*atp); - itp->symbol = "130-Te"; - itp->name = "130-Tellurium"; - itp->isotope = true; - itp->M = 129.9062228; - itp->nsf = 6.01; - pt_backup.push_back(itp); - } - // iodine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "I"; - atp->name = "Iodine"; - atp->z = 53; - atp->M = 126.904473; - atp->radius = 1.3300; - atp->xsf = 53.0; - atp->nsf = 5.282; - } - // xenon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Xe"; - atp->name = "Xenon"; - atp->z = 54; - atp->M = 131.2936; - atp->radius = 2.2000; - atp->xsf = 54.0; - atp->nsf = 4.694; - } - // cesium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cs"; - atp->name = "Cesium"; - atp->z = 55; - atp->M = 132.905452; - atp->radius = 2.6325; - atp->xsf = 55.0; - atp->nsf = 5.422; - } - // barium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ba"; - atp->name = "Barium"; - atp->z = 56; - atp->M = 137.3277; - atp->radius = 2.1705; - atp->xsf = 56.0; - atp->nsf = 5.073; - // isotopes - // 130-barium - itp = new AtomType(*atp); - itp->symbol = "130-Ba"; - itp->name = "130-Barium"; - itp->isotope = true; - itp->M = 129.906310; - itp->nsf = -3.6; - pt_backup.push_back(itp); - // 132-barium - itp = new AtomType(*atp); - itp->symbol = "132-Ba"; - itp->name = "132-Barium"; - itp->isotope = true; - itp->M = 131.905056; - itp->nsf = 7.8; - pt_backup.push_back(itp); - // 134-barium - itp = new AtomType(*atp); - itp->symbol = "134-Ba"; - itp->name = "134-Barium"; - itp->isotope = true; - itp->M = 133.904503; - itp->nsf = 5.7; - pt_backup.push_back(itp); - // 135-barium - itp = new AtomType(*atp); - itp->symbol = "135-Ba"; - itp->name = "135-Barium"; - itp->isotope = true; - itp->M = 134.905683; - itp->nsf = 4.66; - pt_backup.push_back(itp); - // 136-barium - itp = new AtomType(*atp); - itp->symbol = "136-Ba"; - itp->name = "136-Barium"; - itp->isotope = true; - itp->M = 135.904570; - itp->nsf = 4.90; - pt_backup.push_back(itp); - // 137-barium - itp = new AtomType(*atp); - itp->symbol = "137-Ba"; - itp->name = "137-Barium"; - itp->isotope = true; - itp->M = 136.905821; - itp->nsf = 6.82; - pt_backup.push_back(itp); - // 138-barium - itp = new AtomType(*atp); - itp->symbol = "138-Ba"; - itp->name = "138-Barium"; - itp->isotope = true; - itp->M = 137.905241; - itp->nsf = 4.83; - pt_backup.push_back(itp); - } - // lanthanum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "La"; - atp->name = "Lanthanum"; - atp->z = 57; - atp->M = 138.90552; - atp->radius = 1.8725; - atp->xsf = 57.0; - atp->nsf = 8.244; - // isotopes - // 138-lanthanum - itp = new AtomType(*atp); - itp->symbol = "138-La"; - itp->name = "138-Lanthanum"; - itp->isotope = true; - itp->M = 137.907107; - itp->nsf = 8.0; - pt_backup.push_back(itp); - // 139-lanthanum - itp = new AtomType(*atp); - itp->symbol = "139-La"; - itp->name = "139-Lanthanum"; - itp->isotope = true; - itp->M = 138.906348; - itp->nsf = 8.24; - pt_backup.push_back(itp); - } - // cerium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ce"; - atp->name = "Cerium"; - atp->z = 58; - atp->M = 140.1161; - atp->radius = 1.8243; - atp->xsf = 58.0; - atp->nsf = 4.842; - // isotopes - // 136-cerium - itp = new AtomType(*atp); - itp->symbol = "136-Ce"; - itp->name = "136-Cerium"; - itp->isotope = true; - itp->M = 135.907140; - itp->nsf = 5.76; - pt_backup.push_back(itp); - // 138-cerium - itp = new AtomType(*atp); - itp->symbol = "138-Ce"; - itp->name = "138-Cerium"; - itp->isotope = true; - itp->M = 137.905986; - itp->nsf = 6.65; - pt_backup.push_back(itp); - // 140-cerium - itp = new AtomType(*atp); - itp->symbol = "140-Ce"; - itp->name = "140-Cerium"; - itp->isotope = true; - itp->M = 139.905434; - itp->nsf = 4.81; - pt_backup.push_back(itp); - // 142-cerium - itp = new AtomType(*atp); - itp->symbol = "142-Ce"; - itp->name = "142-Cerium"; - itp->isotope = true; - itp->M = 141.909240; - itp->nsf = 4.72; - pt_backup.push_back(itp); - } - // praseodymium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pr"; - atp->name = "Praseodymium"; - atp->z = 59; - atp->M = 140.907652; - atp->radius = 1.8362; - atp->xsf = 59.0; - atp->nsf = 4.585; - } - // neodymium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Nd"; - atp->name = "Neodymium"; - atp->z = 60; - atp->M = 144.243; - atp->radius = 1.8295; - atp->xsf = 60.0; - atp->nsf = 7.695; - // isotopes - // 142-neodymium - itp = new AtomType(*atp); - itp->symbol = "142-Nd"; - itp->name = "142-Neodymium"; - itp->isotope = true; - itp->M = 141.907719; - itp->nsf = 7.7; - pt_backup.push_back(itp); - // 143-neodymium - itp = new AtomType(*atp); - itp->symbol = "143-Nd"; - itp->name = "143-Neodymium"; - itp->isotope = true; - itp->M = 142.909810; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 144-neodymium - itp = new AtomType(*atp); - itp->symbol = "144-Nd"; - itp->name = "144-Neodymium"; - itp->isotope = true; - itp->M = 143.910083; - itp->nsf = 2.8; - pt_backup.push_back(itp); - // 145-neodymium - itp = new AtomType(*atp); - itp->symbol = "145-Nd"; - itp->name = "145-Neodymium"; - itp->isotope = true; - itp->M = 144.912569; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 146-neodymium - itp = new AtomType(*atp); - itp->symbol = "146-Nd"; - itp->name = "146-Neodymium"; - itp->isotope = true; - itp->M = 145.913112; - itp->nsf = 8.7; - pt_backup.push_back(itp); - // 148-neodymium - itp = new AtomType(*atp); - itp->symbol = "148-Nd"; - itp->name = "148-Neodymium"; - itp->isotope = true; - itp->M = 147.916889; - itp->nsf = 5.7; - pt_backup.push_back(itp); - // 150-neodymium - itp = new AtomType(*atp); - itp->symbol = "150-Nd"; - itp->name = "150-Neodymium"; - itp->isotope = true; - itp->M = 149.920887; - itp->nsf = 5.28; - pt_backup.push_back(itp); - } - // promethium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pm"; - atp->name = "Promethium"; - atp->z = 61; - atp->M = 145.0; - atp->radius = 1.8090; - atp->xsf = 61.0; - atp->nsf = 12.64; - } - // samarium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sm"; - atp->name = "Samarium"; - atp->z = 62; - atp->M = 150.363; - atp->radius = 1.8040; - atp->xsf = 62.0; - atp->nsf = 0.005; - // isotopes - // 144-samarium - itp = new AtomType(*atp); - itp->symbol = "144-Sm"; - itp->name = "144-Samarium"; - itp->isotope = true; - itp->M = 143.911995; - itp->nsf = -3.0; - pt_backup.push_back(itp); - // 147-samarium - itp = new AtomType(*atp); - itp->symbol = "147-Sm"; - itp->name = "147-Samarium"; - itp->isotope = true; - itp->M = 146.914893; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 148-samarium - itp = new AtomType(*atp); - itp->symbol = "148-Sm"; - itp->name = "148-Samarium"; - itp->isotope = true; - itp->M = 147.914818; - itp->nsf = -3.0; - pt_backup.push_back(itp); - // 149-samarium - itp = new AtomType(*atp); - itp->symbol = "149-Sm"; - itp->name = "149-Samarium"; - itp->isotope = true; - itp->M = 148.917180; - itp->nsf = 18.7; - pt_backup.push_back(itp); - // 150-samarium - itp = new AtomType(*atp); - itp->symbol = "150-Sm"; - itp->name = "150-Samarium"; - itp->isotope = true; - itp->M = 149.917271; - itp->nsf = 14.0; - pt_backup.push_back(itp); - // 152-samarium - itp = new AtomType(*atp); - itp->symbol = "152-Sm"; - itp->name = "152-Samarium"; - itp->isotope = true; - itp->M = 151.919728; - itp->nsf = -5.0; - pt_backup.push_back(itp); - // 154-samarium - itp = new AtomType(*atp); - itp->symbol = "154-Sm"; - itp->name = "154-Samarium"; - itp->isotope = true; - itp->M = 153.922205; - itp->nsf = 8.0; - pt_backup.push_back(itp); - } - // europium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Eu"; - atp->name = "Europium"; - atp->z = 63; - atp->M = 151.9641; - atp->radius = 1.9840; - atp->xsf = 63.0; - atp->nsf = 5.33; - // isotopes - // 153-europium - itp = new AtomType(*atp); - itp->symbol = "153-Eu"; - itp->name = "153-Europium"; - itp->isotope = true; - itp->M = 152.921226; - itp->nsf = 8.22; - pt_backup.push_back(itp); - } - // gadolinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Gd"; - atp->name = "Gadolinium"; - atp->z = 64; - atp->M = 157.253; - atp->radius = 1.8180; - atp->xsf = 64.0; - atp->nsf = 9.52; - // isotopes - // 152-gadolinium - itp = new AtomType(*atp); - itp->symbol = "152-Gd"; - itp->name = "152-Gadolinium"; - itp->isotope = true; - itp->M = 151.919788; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 154-gadolinium - itp = new AtomType(*atp); - itp->symbol = "154-Gd"; - itp->name = "154-Gadolinium"; - itp->isotope = true; - itp->M = 153.920862; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 155-gadolinium - itp = new AtomType(*atp); - itp->symbol = "155-Gd"; - itp->name = "155-Gadolinium"; - itp->isotope = true; - itp->M = 154.922619; - itp->nsf = 13.8; - pt_backup.push_back(itp); - // 156-gadolinium - itp = new AtomType(*atp); - itp->symbol = "156-Gd"; - itp->name = "156-Gadolinium"; - itp->isotope = true; - itp->M = 155.922120; - itp->nsf = 6.3; - pt_backup.push_back(itp); - // 157-gadolinium - itp = new AtomType(*atp); - itp->symbol = "157-Gd"; - itp->name = "157-Gadolinium"; - itp->isotope = true; - itp->M = 156.923957; - itp->nsf = 4.0; - pt_backup.push_back(itp); - // 158-gadolinium - itp = new AtomType(*atp); - itp->symbol = "158-Gd"; - itp->name = "158-Gadolinium"; - itp->isotope = true; - itp->M = 157.924101; - itp->nsf = 9.0; - pt_backup.push_back(itp); - // 160-gadolinium - itp = new AtomType(*atp); - itp->symbol = "160-Gd"; - itp->name = "160-Gadolinium"; - itp->isotope = true; - itp->M = 159.927051; - itp->nsf = 9.15; - pt_backup.push_back(itp); - } - // terbium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tb"; - atp->name = "Terbium"; - atp->z = 65; - atp->M = 158.925342; - atp->radius = 1.8005; - atp->xsf = 65.0; - atp->nsf = 7.342; - } - // dysprosium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Dy"; - atp->name = "Dysprosium"; - atp->z = 66; - atp->M = 162.5001; - atp->radius = 1.7951; - atp->xsf = 66.0; - atp->nsf = 16.93; - // isotopes - // 156-dysprosium - itp = new AtomType(*atp); - itp->symbol = "156-Dy"; - itp->name = "156-Dysprosium"; - itp->isotope = true; - itp->M = 155.924278; - itp->nsf = 6.1; - pt_backup.push_back(itp); - // 158-dysprosium - itp = new AtomType(*atp); - itp->symbol = "158-Dy"; - itp->name = "158-Dysprosium"; - itp->isotope = true; - itp->M = 157.924405; - itp->nsf = 6.0; - pt_backup.push_back(itp); - // 160-dysprosium - itp = new AtomType(*atp); - itp->symbol = "160-Dy"; - itp->name = "160-Dysprosium"; - itp->isotope = true; - itp->M = 159.925194; - itp->nsf = 6.7; - pt_backup.push_back(itp); - // 161-dysprosium - itp = new AtomType(*atp); - itp->symbol = "161-Dy"; - itp->name = "161-Dysprosium"; - itp->isotope = true; - itp->M = 160.926930; - itp->nsf = 10.3; - pt_backup.push_back(itp); - // 162-dysprosium - itp = new AtomType(*atp); - itp->symbol = "162-Dy"; - itp->name = "162-Dysprosium"; - itp->isotope = true; - itp->M = 161.926795; - itp->nsf = -1.4; - pt_backup.push_back(itp); - // 163-dysprosium - itp = new AtomType(*atp); - itp->symbol = "163-Dy"; - itp->name = "163-Dysprosium"; - itp->isotope = true; - itp->M = 162.928728; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 164-dysprosium - itp = new AtomType(*atp); - itp->symbol = "164-Dy"; - itp->name = "164-Dysprosium"; - itp->isotope = true; - itp->M = 163.929171; - itp->nsf = 49.4; - pt_backup.push_back(itp); - } - // holmium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ho"; - atp->name = "Holmium"; - atp->z = 67; - atp->M = 164.930322; - atp->radius = 1.7886; - atp->xsf = 67.0; - atp->nsf = 8.443; - } - // erbium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Er"; - atp->name = "Erbium"; - atp->z = 68; - atp->M = 167.2593; - atp->radius = 1.7794; - atp->xsf = 68.0; - atp->nsf = 7.792; - // isotopes - // 162-erbium - itp = new AtomType(*atp); - itp->symbol = "162-Er"; - itp->name = "162-Erbium"; - itp->isotope = true; - itp->M = 161.928775; - itp->nsf = 9.01; - pt_backup.push_back(itp); - // 164-erbium - itp = new AtomType(*atp); - itp->symbol = "164-Er"; - itp->name = "164-Erbium"; - itp->isotope = true; - itp->M = 163.929197; - itp->nsf = 7.95; - pt_backup.push_back(itp); - // 166-erbium - itp = new AtomType(*atp); - itp->symbol = "166-Er"; - itp->name = "166-Erbium"; - itp->isotope = true; - itp->M = 165.930290; - itp->nsf = 10.51; - pt_backup.push_back(itp); - // 167-erbium - itp = new AtomType(*atp); - itp->symbol = "167-Er"; - itp->name = "167-Erbium"; - itp->isotope = true; - itp->M = 166.932045; - itp->nsf = 3.06; - pt_backup.push_back(itp); - // 168-erbium - itp = new AtomType(*atp); - itp->symbol = "168-Er"; - itp->name = "168-Erbium"; - itp->isotope = true; - itp->M = 167.932368; - itp->nsf = 7.43; - pt_backup.push_back(itp); - // 170-erbium - itp = new AtomType(*atp); - itp->symbol = "170-Er"; - itp->name = "170-Erbium"; - itp->isotope = true; - itp->M = 169.935460; - itp->nsf = 9.61; - pt_backup.push_back(itp); - } - // thulium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tm"; - atp->name = "Thulium"; - atp->z = 69; - atp->M = 168.934212; - atp->radius = 1.7687; - atp->xsf = 69.0; - atp->nsf = 7.073; - } - // ytterbium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Yb"; - atp->name = "Ytterbium"; - atp->z = 70; - atp->M = 173.043; - atp->radius = 1.9396; - atp->xsf = 70.0; - atp->nsf = 12.413; - // isotopes - // 168-ytterbium - itp = new AtomType(*atp); - itp->symbol = "168-Yb"; - itp->name = "168-Ytterbium"; - itp->isotope = true; - itp->M = 167.933894; - itp->nsf = -4.07; - pt_backup.push_back(itp); - // 170-ytterbium - itp = new AtomType(*atp); - itp->symbol = "170-Yb"; - itp->name = "170-Ytterbium"; - itp->isotope = true; - itp->M = 169.934759; - itp->nsf = 6.8; - pt_backup.push_back(itp); - // 171-ytterbium - itp = new AtomType(*atp); - itp->symbol = "171-Yb"; - itp->name = "171-Ytterbium"; - itp->isotope = true; - itp->M = 170.936322; - itp->nsf = 9.7; - pt_backup.push_back(itp); - // 172-ytterbium - itp = new AtomType(*atp); - itp->symbol = "172-Yb"; - itp->name = "172-Ytterbium"; - itp->isotope = true; - itp->M = 171.9363777; - itp->nsf = 9.5; - pt_backup.push_back(itp); - // 173-ytterbium - itp = new AtomType(*atp); - itp->symbol = "173-Yb"; - itp->name = "173-Ytterbium"; - itp->isotope = true; - itp->M = 172.9382068; - itp->nsf = 9.56; - pt_backup.push_back(itp); - // 174-ytterbium - itp = new AtomType(*atp); - itp->symbol = "174-Yb"; - itp->name = "174-Ytterbium"; - itp->isotope = true; - itp->M = 173.9388581; - itp->nsf = 19.2; - pt_backup.push_back(itp); - // 176-ytterbium - itp = new AtomType(*atp); - itp->symbol = "176-Yb"; - itp->name = "176-Ytterbium"; - itp->isotope = true; - itp->M = 175.942568; - itp->nsf = 8.7; - pt_backup.push_back(itp); - } - // lutetium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Lu"; - atp->name = "Lutetium"; - atp->z = 71; - atp->M = 174.9671; - atp->radius = 1.7515; - atp->xsf = 71.0; - atp->nsf = 7.213; - // isotopes - // 175-lutetium - itp = new AtomType(*atp); - itp->symbol = "175-Lu"; - itp->name = "175-Lutetium"; - itp->isotope = true; - itp->M = 174.9407679; - itp->nsf = 7.28; - pt_backup.push_back(itp); - // 176-lutetium - itp = new AtomType(*atp); - itp->symbol = "176-Lu"; - itp->name = "176-Lutetium"; - itp->isotope = true; - itp->M = 175.9426824; - itp->nsf = 6.1; - pt_backup.push_back(itp); - } - // hafnium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Hf"; - atp->name = "Hafnium"; - atp->z = 72; - atp->M = 178.492; - atp->radius = 1.5973; - atp->xsf = 72.0; - atp->nsf = 7.7714; - // isotopes - // 174-hafnium - itp = new AtomType(*atp); - itp->symbol = "174-Hf"; - itp->name = "174-Hafnium"; - itp->isotope = true; - itp->M = 173.940040; - itp->nsf = 10.9; - pt_backup.push_back(itp); - // 176-hafnium - itp = new AtomType(*atp); - itp->symbol = "176-Hf"; - itp->name = "176-Hafnium"; - itp->isotope = true; - itp->M = 175.9414018; - itp->nsf = 6.61; - pt_backup.push_back(itp); - // 177-hafnium - itp = new AtomType(*atp); - itp->symbol = "177-Hf"; - itp->name = "177-Hafnium"; - itp->isotope = true; - itp->M = 176.9432200; - itp->nsf = 0.8; - pt_backup.push_back(itp); - // 178-hafnium - itp = new AtomType(*atp); - itp->symbol = "178-Hf"; - itp->name = "178-Hafnium"; - itp->isotope = true; - itp->M = 177.9436977; - itp->nsf = 5.9; - pt_backup.push_back(itp); - // 179-hafnium - itp = new AtomType(*atp); - itp->symbol = "179-Hf"; - itp->name = "179-Hafnium"; - itp->isotope = true; - itp->M = 178.9458151; - itp->nsf = 7.46; - pt_backup.push_back(itp); - // 180-hafnium - itp = new AtomType(*atp); - itp->symbol = "180-Hf"; - itp->name = "180-Hafnium"; - itp->isotope = true; - itp->M = 179.9465488; - itp->nsf = 13.2; - pt_backup.push_back(itp); - } - // tantalum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ta"; - atp->name = "Tantalum"; - atp->z = 73; - atp->M = 180.94791; - atp->radius = 1.4280; - atp->xsf = 73.0; - atp->nsf = 6.917; - // isotopes - // 180-tantalum - itp = new AtomType(*atp); - itp->symbol = "180-Ta"; - itp->name = "180-Tantalum"; - itp->isotope = true; - itp->M = 179.947466; - itp->nsf = 7.0; - pt_backup.push_back(itp); - // 181-tantalum - itp = new AtomType(*atp); - itp->symbol = "181-Ta"; - itp->name = "181-Tantalum"; - itp->isotope = true; - itp->M = 180.947996; - itp->nsf = 6.91; - pt_backup.push_back(itp); - } - // tungsten - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "W"; - atp->name = "Tungsten"; - atp->z = 74; - atp->M = 183.841; - atp->radius = 1.3705; - atp->xsf = 74.0; - atp->nsf = 4.75518; - // isotopes - // 180-tungsten - itp = new AtomType(*atp); - itp->symbol = "180-W"; - itp->name = "180-Tungsten"; - itp->isotope = true; - itp->M = 179.946706; - itp->nsf = 5.0; - pt_backup.push_back(itp); - // 182-tungsten - itp = new AtomType(*atp); - itp->symbol = "182-W"; - itp->name = "182-Tungsten"; - itp->isotope = true; - itp->M = 181.948206; - itp->nsf = 7.04; - pt_backup.push_back(itp); - // 183-tungsten - itp = new AtomType(*atp); - itp->symbol = "183-W"; - itp->name = "183-Tungsten"; - itp->isotope = true; - itp->M = 182.9502245; - itp->nsf = 6.59; - pt_backup.push_back(itp); - // 184-tungsten - itp = new AtomType(*atp); - itp->symbol = "184-W"; - itp->name = "184-Tungsten"; - itp->isotope = true; - itp->M = 183.9509326; - itp->nsf = 7.55; - pt_backup.push_back(itp); - // 186-tungsten - itp = new AtomType(*atp); - itp->symbol = "186-W"; - itp->name = "186-Tungsten"; - itp->isotope = true; - itp->M = 185.954362; - itp->nsf = -0.73; - pt_backup.push_back(itp); - } - // rhenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Re"; - atp->name = "Rhenium"; - atp->z = 75; - atp->M = 186.2071; - atp->radius = 1.3800; - atp->xsf = 75.0; - atp->nsf = 9.22; - // isotopes - // 185-rhenium - itp = new AtomType(*atp); - itp->symbol = "185-Re"; - itp->name = "185-Rhenium"; - itp->isotope = true; - itp->M = 184.9529557; - itp->nsf = 9.0; - pt_backup.push_back(itp); - // 187-rhenium - itp = new AtomType(*atp); - itp->symbol = "187-Re"; - itp->name = "187-Rhenium"; - itp->isotope = true; - itp->M = 186.9557508; - itp->nsf = 9.3; - pt_backup.push_back(itp); - } - // osmium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Os"; - atp->name = "Osmium"; - atp->z = 76; - atp->M = 190.233; - atp->radius = 1.3676; - atp->xsf = 76.0; - atp->nsf = 10.72; - // isotopes - // 184-osmium - itp = new AtomType(*atp); - itp->symbol = "184-Os"; - itp->name = "184-Osmium"; - itp->isotope = true; - itp->M = 183.952491; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 186-osmium - itp = new AtomType(*atp); - itp->symbol = "186-Os"; - itp->name = "186-Osmium"; - itp->isotope = true; - itp->M = 185.953838; - itp->nsf = 12.0; - pt_backup.push_back(itp); - // 187-osmium - itp = new AtomType(*atp); - itp->symbol = "187-Os"; - itp->name = "187-Osmium"; - itp->isotope = true; - itp->M = 186.9557479; - itp->nsf = 10.0; - pt_backup.push_back(itp); - // 188-osmium - itp = new AtomType(*atp); - itp->symbol = "188-Os"; - itp->name = "188-Osmium"; - itp->isotope = true; - itp->M = 187.9558360; - itp->nsf = 7.8; - pt_backup.push_back(itp); - // 189-osmium - itp = new AtomType(*atp); - itp->symbol = "189-Os"; - itp->name = "189-Osmium"; - itp->isotope = true; - itp->M = 188.9581449; - itp->nsf = 11.0; - pt_backup.push_back(itp); - // 190-osmium - itp = new AtomType(*atp); - itp->symbol = "190-Os"; - itp->name = "190-Osmium"; - itp->isotope = true; - itp->M = 189.958445; - itp->nsf = 11.4; - pt_backup.push_back(itp); - // 192-osmium - itp = new AtomType(*atp); - itp->symbol = "192-Os"; - itp->name = "192-Osmium"; - itp->isotope = true; - itp->M = 191.961479; - itp->nsf = 11.9; - pt_backup.push_back(itp); - } - // iridium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ir"; - atp->name = "Iridium"; - atp->z = 77; - atp->M = 192.2173; - atp->radius = 1.3573; - atp->xsf = 77.0; - atp->nsf = 10.63; - } - // platinum - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pt"; - atp->name = "Platinum"; - atp->z = 78; - atp->M = 195.0782; - atp->radius = 1.3873; - atp->xsf = 78.0; - atp->nsf = 9.601; - // isotopes - // 190-platinum - itp = new AtomType(*atp); - itp->symbol = "190-Pt"; - itp->name = "190-Platinum"; - itp->isotope = true; - itp->M = 189.959930; - itp->nsf = 9.0; - pt_backup.push_back(itp); - // 192-platinum - itp = new AtomType(*atp); - itp->symbol = "192-Pt"; - itp->name = "192-Platinum"; - itp->isotope = true; - itp->M = 191.961035; - itp->nsf = 9.9; - pt_backup.push_back(itp); - // 194-platinum - itp = new AtomType(*atp); - itp->symbol = "194-Pt"; - itp->name = "194-Platinum"; - itp->isotope = true; - itp->M = 193.962664; - itp->nsf = 10.55; - pt_backup.push_back(itp); - // 195-platinum - itp = new AtomType(*atp); - itp->symbol = "195-Pt"; - itp->name = "195-Platinum"; - itp->isotope = true; - itp->M = 194.964774; - itp->nsf = 8.91; - pt_backup.push_back(itp); - // 196-platinum - itp = new AtomType(*atp); - itp->symbol = "196-Pt"; - itp->name = "196-Platinum"; - itp->isotope = true; - itp->M = 195.964935; - itp->nsf = 9.89; - pt_backup.push_back(itp); - // 198-platinum - itp = new AtomType(*atp); - itp->symbol = "198-Pt"; - itp->name = "198-Platinum"; - itp->isotope = true; - itp->M = 197.967876; - itp->nsf = 7.8; - pt_backup.push_back(itp); - } - // gold - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Au"; - atp->name = "Gold"; - atp->z = 79; - atp->M = 196.966552; - atp->radius = 1.4419; - atp->xsf = 79.0; - atp->nsf = 7.907; - } - // mercury - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Hg"; - atp->name = "Mercury"; - atp->z = 80; - atp->M = 200.592; - atp->radius = 1.5025; - atp->xsf = 80.0; - atp->nsf = 12.59545; - // isotopes - // 196-mercury - itp = new AtomType(*atp); - itp->symbol = "196-Hg"; - itp->name = "196-Mercury"; - itp->isotope = true; - itp->M = 195.965815; - itp->nsf = 30.3; - pt_backup.push_back(itp); - // 199-mercury - itp = new AtomType(*atp); - itp->symbol = "199-Hg"; - itp->name = "199-Mercury"; - itp->isotope = true; - itp->M = 198.968262; - itp->nsf = 16.9; - pt_backup.push_back(itp); - // 202-mercury - itp = new AtomType(*atp); - itp->symbol = "202-Hg"; - itp->name = "202-Mercury"; - itp->isotope = true; - itp->M = 201.970626; - itp->nsf = 11.002; - pt_backup.push_back(itp); - } - // thallium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Tl"; - atp->name = "Thallium"; - atp->z = 81; - atp->M = 204.38332; - atp->radius = 1.7283; - atp->xsf = 81.0; - atp->nsf = 8.7765; - // isotopes - // 203-thalium - itp = new AtomType(*atp); - itp->symbol = "203-Tl"; - itp->name = "203-Thallium"; - itp->isotope = true; - itp->M = 202.972329; - itp->nsf = 8.51; - pt_backup.push_back(itp); - // 205-thalium - itp = new AtomType(*atp); - itp->symbol = "205-Tl"; - itp->name = "205-Thallium"; - itp->isotope = true; - itp->M = 204.974412; - itp->nsf = 8.87; - pt_backup.push_back(itp); - } - // lead - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pb"; - atp->name = "Lead"; - atp->z = 82; - atp->M = 207.21; - atp->radius = 1.7501; - atp->xsf = 82.0; - atp->nsf = 9.4012; - // isotopes - // 204-lead - itp = new AtomType(*atp); - itp->symbol = "204-Pb"; - itp->name = "204-Lead"; - itp->isotope = true; - itp->M = 203.973029; - itp->nsf = 10.893; - pt_backup.push_back(itp); - // 206-lead - itp = new AtomType(*atp); - itp->symbol = "206-Pb"; - itp->name = "206-Lead"; - itp->isotope = true; - itp->M = 205.974449; - itp->nsf = 9.2221; - pt_backup.push_back(itp); - // 207-lead - itp = new AtomType(*atp); - itp->symbol = "207-Pb"; - itp->name = "207-Lead"; - itp->isotope = true; - itp->M = 206.975881; - itp->nsf = 9.286; - pt_backup.push_back(itp); - // 208-lead - itp = new AtomType(*atp); - itp->symbol = "208-Pb"; - itp->name = "208-Lead"; - itp->isotope = true; - itp->M = 207.976636; - itp->nsf = 9.494; - pt_backup.push_back(itp); - } - // bismuth - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Bi"; - atp->name = "Bismuth"; - atp->z = 83; - atp->M = 208.980382; - atp->radius = 1.4600; - atp->xsf = 83.0; - atp->nsf = 8.5322; - } - // polonium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Po"; - atp->name = "Polonium"; - atp->z = 84; - atp->M = 209.0; - atp->radius = 1.4600; - atp->xsf = 84.0; - atp->nsf = 0.0; - } - // astatine - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "At"; - atp->name = "Astatine"; - atp->z = 85; - atp->M = 210.0; - atp->radius = 1.4500; - atp->xsf = 85.0; - atp->nsf = 0.0; - } - // radon - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rn"; - atp->name = "Radon"; - atp->z = 86; - atp->M = 222.0; - atp->radius = 1.4300; - atp->xsf = 86.0; - atp->nsf = 0.0; - } - // francium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Fr"; - atp->name = "Francium"; - atp->z = 87; - atp->M = 223.0; - atp->radius = 2.5000; - atp->xsf = 87.0; - atp->nsf = 0.0; - } - // radium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ra"; - atp->name = "Radium"; - atp->z = 88; - atp->M = 226.0; - atp->radius = 2.1400; - atp->xsf = 88.0; - atp->nsf = 10.0; - } - // actinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ac"; - atp->name = "Actinium"; - atp->z = 89; - atp->M = 227.0; - atp->radius = 1.8775; - atp->xsf = 89.0; - atp->nsf = 0.0; - } - // thorium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Th"; - atp->name = "Thorium"; - atp->z = 90; - atp->M = 232.03811; - atp->radius = 1.7975; - atp->xsf = 90.0; - atp->nsf = 10.31; - } - // protactinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pa"; - atp->name = "Protactinium"; - atp->z = 91; - atp->M = 231.035882; - atp->radius = 1.6086; - atp->xsf = 91.0; - atp->nsf = 9.13; - } - // uranium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "U"; - atp->name = "Uranium"; - atp->z = 92; - atp->M = 238.028913; - atp->radius = 1.5683; - atp->xsf = 92.0; - atp->nsf = 8.417; - // isotopes - // 233-uranium - itp = new AtomType(*atp); - itp->symbol = "233-U"; - itp->name = "233-Uranium"; - itp->isotope = true; - itp->M = 233.039628; - itp->nsf = 10.1; - pt_backup.push_back(itp); - // 234-uranium - itp = new AtomType(*atp); - itp->symbol = "234-U"; - itp->name = "234-Uranium"; - itp->isotope = true; - itp->M = 234.0409456; - itp->nsf = 12.4; - pt_backup.push_back(itp); - // 235-uranium - itp = new AtomType(*atp); - itp->symbol = "235-U"; - itp->name = "235-Uranium"; - itp->isotope = true; - itp->M = 235.0439231; - itp->nsf = 10.50; - pt_backup.push_back(itp); - // 238-uranium - itp = new AtomType(*atp); - itp->symbol = "238-U"; - itp->name = "238-Uranium"; - itp->isotope = true; - itp->M = 238.0507826; - itp->nsf = 8.407; - pt_backup.push_back(itp); - } - // neptunium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Np"; - atp->name = "Neptunium"; - atp->z = 93; - atp->M = 237.0; - atp->radius = 1.0000; - atp->xsf = 93.0; - atp->nsf = 10.55; - } - // plutonium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Pu"; - atp->name = "Plutonium"; - atp->z = 94; - atp->M = 244.0; - atp->radius = 1.0000; - atp->xsf = 94.0; - atp->nsf = 7.71; - // isotopes - // 240-plutonium - itp = new AtomType(*atp); - itp->symbol = "240-Pu"; - itp->name = "240-Plutonium"; - itp->isotope = true; - itp->M = 240.0538075; - itp->nsf = 3.5; - pt_backup.push_back(itp); - // 242-plutonium - itp = new AtomType(*atp); - itp->symbol = "242-Pu"; - itp->name = "242-Plutonium"; - itp->isotope = true; - itp->M = 242.0587368; - itp->nsf = 8.1; - pt_backup.push_back(itp); - } - // americium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Am"; - atp->name = "Americium"; - atp->z = 95; - atp->M = 243.0; - atp->radius = 1.0000; - atp->xsf = 95.0; - atp->nsf = 8.32; - } - // curium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cm"; - atp->name = "Curium"; - atp->z = 96; - atp->M = 247.0; - atp->radius = 1.0000; - atp->xsf = 96.0; - atp->nsf = 9.53; - // isotopes - // 246-curium - itp = new AtomType(*atp); - itp->symbol = "246-Cm"; - itp->name = "246-Curium"; - itp->isotope = true; - itp->M = 246.0672176; - itp->nsf = 9.3; - pt_backup.push_back(itp); - // 248-curium - itp = new AtomType(*atp); - itp->symbol = "248-Cm"; - itp->name = "248-Curium"; - itp->isotope = true; - itp->M = 248.072342; - itp->nsf = 7.7; - pt_backup.push_back(itp); - } - // berkelium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Bk"; - atp->name = "Berkelium"; - atp->z = 97; - atp->M = 247.0; - atp->radius = 1.0000; - atp->xsf = 97.0; - atp->nsf = 0.0; - } - // californium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Cf"; - atp->name = "Californium"; - atp->z = 98; - atp->M = 251.0; - atp->radius = 1.0000; - atp->xsf = 98.0; - atp->nsf = 0.0; - } - // einsteinium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Es"; - atp->name = "Einsteinium"; - atp->z = 99; - atp->M = 252.0; - atp->radius = 1.0000; - atp->xsf = 99.0; - atp->nsf = 0.0; - } - // fermium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Fm"; - atp->name = "Fermium"; - atp->z = 100; - atp->M = 257.0; - atp->radius = 1.0000; - atp->xsf = 100.0; - atp->nsf = 0.0; - } - // mendelevium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Md"; - atp->name = "Mendelevium"; - atp->z = 101; - atp->M = 258.0; - atp->radius = 1.0000; - atp->xsf = 101.0; - atp->nsf = 0.0; - } - // nobelium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "No"; - atp->name = "Nobelium"; - atp->z = 102; - atp->M = 259.0; - atp->radius = 1.0000; - atp->xsf = 102.0; - atp->nsf = 0.0; - } - // lawrencium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Lr"; - atp->name = "Lawrencium"; - atp->z = 103; - atp->M = 262.0; - atp->radius = 1.0000; - atp->xsf = 103.0; - atp->nsf = 0.0; - } - // rutherfordium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rf"; - atp->name = "Rutherfordium"; - atp->z = 104; - atp->M = 261.0; - atp->radius = 1.0000; - atp->xsf = 104.0; - atp->nsf = 0.0; - } - // dubnium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Db"; - atp->name = "Dubnium"; - atp->z = 105; - atp->M = 262.0; - atp->radius = 1.0000; - atp->xsf = 105.0; - atp->nsf = 0.0; - } - // seaborgium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Sg"; - atp->name = "Seaborgium"; - atp->z = 106; - atp->M = 266.0; - atp->radius = 1.0000; - atp->xsf = 106.0; - atp->nsf = 0.0; - } - // bohrium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Bh"; - atp->name = "Bohrium"; - atp->z = 107; - atp->M = 264.0; - atp->radius = 1.0000; - atp->xsf = 107.0; - atp->nsf = 0.0; - } - // hassium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Hs"; - atp->name = "Hassium"; - atp->z = 108; - atp->M = 277.0; - atp->radius = 1.0000; - atp->xsf = 108.0; - atp->nsf = 0.0; - } - // meitnerium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Mt"; - atp->name = "Meitnerium"; - atp->z = 109; - atp->M = 268.0; - atp->radius = 1.0000; - atp->xsf = 109.0; - atp->nsf = 0.0; - } - // darmstadtium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Ds"; - atp->name = "Darmstadtium"; - atp->z = 110; - atp->M = 281.0; - atp->radius = 1.0000; - atp->xsf = 110.0; - atp->nsf = 0.0; - } - // roentgenium - atp = *pt_backup.insert(pt_backup.end(), new AtomType()); - { - atp->symbol = "Rg"; - atp->name = "Roentgenium"; - atp->z = 111; - atp->M = 272.0; - atp->radius = 1.0000; - atp->xsf = 111.0; - atp->nsf = 0.0; - } -} - -// End of file diff --git a/src/extensions/libpdffit2/PeriodicTable.h b/src/extensions/libpdffit2/PeriodicTable.h deleted file mode 100644 index 99949031..00000000 --- a/src/extensions/libpdffit2/PeriodicTable.h +++ /dev/null @@ -1,75 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class PeriodicTable -* -* Comments: singleton class, use PeriodicTable::instance() -* for its pointer -* -***********************************************************************/ - -#ifndef PERIODICTABLE_H_INCLUDED -#define PERIODICTABLE_H_INCLUDED - -#include -#include -#include -#include -#include "AtomType.h" -#include "support_msvc9.h" - -// PeriodicTable -class PeriodicTable -{ - private: - - // PeriodicTable is a singleton class - PeriodicTable(); - - public: - - // Access to singleton instance - static PeriodicTable* instance() - { - static std::unique_ptr the_table(new PeriodicTable()); - return the_table.get(); - } - // Destructor - ~PeriodicTable(); - - // Methods - AtomType* name(const std::string& s); - AtomType* symbol(const std::string& s); - AtomType* lookup(std::string s); // icase lookup - bool has(const std::string& s); - void defAtomType(const AtomType& atp); - void deleteAtomType(const AtomType* atp); - void reset(AtomType* atp); // retrieve atp from pt_backup - void resetAll(); // reset all elements - - private: - - // Data Members - std::map name_index; - std::map symbol_index; - std::deque pt_public; - std::deque pt_backup; - - // Methods - void init(); - void clear(); - void fill_pt_backup(); -}; - -#endif // PERIODICTABLE_H_INCLUDED diff --git a/src/extensions/libpdffit2/PointsInSphere.cc b/src/extensions/libpdffit2/PointsInSphere.cc deleted file mode 100644 index 881812a0..00000000 --- a/src/extensions/libpdffit2/PointsInSphere.cc +++ /dev/null @@ -1,243 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin -* -* Comments: sequencers for lattice points inside 3D sphere -* -***********************************************************************/ - -#include -#include "PointsInSphere.h" - -using namespace NS_POINTSINSPHERE; - -//////////////////////////////////////////////////////////////////////// -// LatticeParameters -//////////////////////////////////////////////////////////////////////// - -LatticeParameters::LatticeParameters( double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - a(_a), b(_b), c(_c), - alpha(_alpha), beta(_beta), gamma(_gamma) -{ - update(); -} - -LatticeParameters& LatticeParameters::update() -{ - ca = cosd(alpha); cb = cosd(beta); cg = cosd(gamma); - sa = sind(alpha); sb = sind(beta); sg = sind(gamma); - // Vunit is a volume of unit cell with a=b=c=1 - const double Vunit = sqrt(1.0 + 2.0*ca*cb*cg - ca*ca - cb*cb - cg*cg); - ar = sa/(a*Vunit); - br = sb/(b*Vunit); - cr = sg/(c*Vunit); - car = (cb*cg - ca)/(sb*sg); sar = sqrt(1.0 - car*car); - cbr = (ca*cg - cb)/(sa*sg); sbr = sqrt(1.0 - cbr*cbr); - cgr = (ca*cb - cg)/(sa*sb); sgr = sqrt(1.0 - cgr*cgr); - alphar = 180.0/M_PI*acos(car); - betar = 180.0/M_PI*acos(cbr); - gammar = 180.0/M_PI*acos(cgr); - return *this; -} - -LatticeParameters LatticeParameters::reciprocal() const -{ - using namespace std; - LatticeParameters rec(*this); - swap(rec.a, rec.ar); - swap(rec.b, rec.br); - swap(rec.c, rec.cr); - swap(rec.alpha, rec.alphar); - swap(rec.beta, rec.betar); - swap(rec.gamma, rec.gammar); - swap(rec.ca, rec.car); - swap(rec.cb, rec.cbr); - swap(rec.cg, rec.cgr); - swap(rec.sa, rec.sar); - swap(rec.sb, rec.sbr); - swap(rec.sg, rec.sgr); - return rec; -} - - -//////////////////////////////////////////////////////////////////////// -// PointsInSphere -//////////////////////////////////////////////////////////////////////// - -PointsInSphere::PointsInSphere( double _Rmin, double _Rmax, - const LatticeParameters& _latpar ) : - m(mno[0]), n(mno[1]), o(mno[2]), - Rmin(_Rmin), Rmax(_Rmax), latpar(_latpar) -{ - init(); - rewind(); -} - -PointsInSphere::PointsInSphere( double _Rmin, double _Rmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - m(mno[0]), n(mno[1]), o(mno[2]), - Rmin(_Rmin), Rmax(_Rmax), - latpar(_a, _b, _c, _alpha, _beta, _gamma) -{ - init(); - rewind(); -} - -void PointsInSphere::init() -{ - RminSquare = (Rmin < 0.0) ? -(Rmin*Rmin) : Rmin*Rmin; - RmaxSquare = (Rmax < 0.0) ? -(Rmax*Rmax) : Rmax*Rmax; - dn0dm = latpar.cgr*latpar.br/latpar.ar; - do0dm = latpar.cbr*latpar.cr/latpar.ar; - // 2D reciprocal parameters in bc plane - b2r = 1.0/(latpar.b*latpar.sa); - c2r = 1.0/(latpar.c*latpar.sa); - ca2r = -latpar.ca; - do0dn = ca2r*c2r/b2r; - // 1D reciprocal along c axis - c1r = 1.0/latpar.c; -} - -void PointsInSphere::rewind() -{ - mHalfSpan = Rmax*latpar.ar; - hi_m = int(ceil(mHalfSpan)); - m = -hi_m; - // make indices n, o invalid, reset the nearest point - n = hi_n = 0; - o = hi_o = outside_o = 0; - n0plane = o0plane = o0line = 0.0; - // unset excluded zone - oExclHalfSpan = 0.0; - // get the first inside point - next_o(); -} - -void PointsInSphere::next_o() -{ - do - { - o++; - if (o < hi_o) - { - return; - } - if (hi_o != outside_o) - { - hi_o = outside_o; - o = int( ceil(o0line+oExclHalfSpan) ) - 1; - continue; - } - next_n(); - } - while (!finished()); -} - -void PointsInSphere::next_n() -{ - do - { - n++; - if (n < hi_n) - { - o0line = o0plane + (n-n0plane)*do0dn; - double RlineSquare = RplaneSquare - pow((n-n0plane)/b2r,2); - oHalfSpan = RlineSquare > 0.0 ? sqrt(RlineSquare)*c1r : 0.0; - // parentheses improve round-off errors around [0,0,0] - double RExclSquare = RminSquare + (RlineSquare - RmaxSquare); - oExclHalfSpan = RExclSquare > 0.0 ? sqrt(RExclSquare)*c1r : 0.0; - o = int(floor(o0line - oHalfSpan)); - outside_o = int(ceil(o0line + oHalfSpan)); - hi_o = outside_o; - if (oExclHalfSpan) - { - int hole_o = int(ceil(o0line - oExclHalfSpan)); - if (fabs(hole_o-o0line) < oExclHalfSpan) hi_o = hole_o; - } - return; - } - next_m(); - } - while (!finished()); -} - -void PointsInSphere::next_m() -{ - m++; - if (finished()) - { - return; - } - // not finished here - n0plane = m*dn0dm; - o0plane = m*do0dm; - RplaneSquare = RmaxSquare - pow(m/latpar.ar,2); - nHalfSpan = RplaneSquare > 0.0 ? sqrt(RplaneSquare)*b2r : 0.0; - n = int(floor(n0plane - nHalfSpan)); - hi_n = int(ceil(n0plane + nHalfSpan)); -} - -double PointsInSphere::r() const -{ - const double &a = latpar.a, &b = latpar.b, &c = latpar.c; - const double &ca = latpar.ca, &cb = latpar.cb, &cg = latpar.cg; - return sqrt( m*m*a*a + n*n*b*b + o*o*c*c - + 2*m*n*a*b*cg + 2*m*o*a*c*cb + 2*n*o*b*c*ca ); -} - - -//////////////////////////////////////////////////////////////////////// -// ReflectionsInQminQmax -//////////////////////////////////////////////////////////////////////// - -ReflectionsInQminQmax::ReflectionsInQminQmax( double _Qmin, double _Qmax, - const LatticeParameters& _latpar ) : - Qmin(_Qmin), Qmax(_Qmax), - latpar(_latpar), - sph(Qmin*M_1_PI/2.0, Qmax*M_1_PI/2.0, latpar.reciprocal()), - hkl(sph.mno), h(hkl[0]), k(hkl[1]), l(hkl[2]) -{ } - -ReflectionsInQminQmax::ReflectionsInQminQmax( double _Qmin, double _Qmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - Qmin(_Qmin), Qmax(_Qmax), - latpar(_a, _b, _c, _alpha, _beta, _gamma), - sph(Qmin*M_1_PI/2.0, Qmax*M_1_PI/2.0, latpar.reciprocal()), - hkl(sph.mno), h(hkl[0]), k(hkl[1]), l(hkl[2]) -{ } - - -//////////////////////////////////////////////////////////////////////// -// ReflectionsInDmaxDmin -//////////////////////////////////////////////////////////////////////// - -ReflectionsInDmaxDmin::ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - const LatticeParameters& _latpar ) : - ReflectionsInQminQmax(2.0*M_PI/_Dmax, 2.0*M_PI/_Dmin, _latpar), - Dmax(_Dmax), Dmin(_Dmin) -{ } - -ReflectionsInDmaxDmin::ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ) : - ReflectionsInQminQmax( 2.0*M_PI/_Dmax, 2.0*M_PI/_Dmin, - _a, _b, _c, _alpha, _beta, _gamma ), - Dmax(_Dmax), Dmin(_Dmin) -{ } - -// End of file diff --git a/src/extensions/libpdffit2/PointsInSphere.h b/src/extensions/libpdffit2/PointsInSphere.h deleted file mode 100644 index 2c3b5d45..00000000 --- a/src/extensions/libpdffit2/PointsInSphere.h +++ /dev/null @@ -1,182 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* classes PointsInSphere, ReflectionsInQminQmax, ReflectionsInDmaxDmin -* -* Constructors: -* -* PointsInSphere(Rmin, Rmax, a, b, c, alpha, beta, gamma) -* ReflectionsInQminQmax(Qmin, Qmax, a, b, c, alpha, beta, gamma) -* ReflectionsInDmaxDmin(Dmax, Dmin, a, b, c, alpha, beta, gamma) -* -* Examples: -* -* PointsInSphere sph(Rmin, Rmax, a, b, c, alpha, beta, gamma) -* for (sph.rewind(); !sph.finished(); sph.next()) -* { -* // lattice indices are in sph.m, sph.n, sph.o or sph.mno[3] -* // sph.r() is distance from origin, -* // where Rmin < sph.r() < Rmax -* } -* -* ReflectionsInQminQmax refl(Qmin, Qmax, a, b, c, alpha, beta, gamma) -* for (ReflectionsInQminQmax ref(Qmin, Qmax, a, b, c, alpha, beta, gamma); -* !ref.finished(); ref.next() ) -* { -* // Miller indices are in ref.h, ref.k, ref.l or ref.hkl[3] -* // ref.Q() is magnitude of Q vector -* // ref.d() is lattice plane spacing -* } -* -* Tip: add epsilon to Rmax to avoid roundoff issues -* -***********************************************************************/ - -#ifndef POINTSINSPHERE_H_INCLUDED -#define POINTSINSPHERE_H_INCLUDED - -#include - - -namespace NS_POINTSINSPHERE { - -class LatticeParameters -{ -public: - LatticeParameters( double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - // calculate all properties from current lattice parameters - LatticeParameters& update(); - // return a reciprocal of this lattice - LatticeParameters reciprocal() const; - // input arguments - double a, b, c, alpha, beta, gamma; - // cosines and sines of direct lattice angles - double ca, cb, cg, sa, sb, sg; - // reciprocal lattice and its cosines and sines - double ar, br, cr, alphar, betar, gammar; - double car, cbr, cgr, sar, sbr, sgr; -private: - // helper functions - inline double cosd(double x) { return cos(M_PI/180.0*x); } - inline double sind(double x) { return sin(M_PI/180.0*x); } -}; - -class PointsInSphere -{ -public: - PointsInSphere( double _Rmin, double _Rmax, - const LatticeParameters& _latpar ); - PointsInSphere( double _Rmin, double _Rmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - void rewind(); - inline void next() - { - next_o(); - } - inline bool finished() - { - return !(m < hi_m); - } - // mno array and m, n, o aliases are supposed to be read only - int mno[3]; - int &m, &n, &o; - double r() const; - // input arguments - const double Rmin, Rmax; - const LatticeParameters latpar; -private: - // loop advance functions - void next_m(); - void next_n(); - void next_o(); - void init(); - // calculated constants set by init() - double RminSquare, RmaxSquare; - // 2D reciprocal parameters and cosine in bc plane - double b2r, c2r, ca2r; - // reciprocal c - double c1r; - // offset of the nearest point to [0,0,0] - double dn0dm, do0dm, do0dn; - // loop variables - double n0plane, o0plane, o0line; - double mHalfSpan, nHalfSpan, oHalfSpan; - // o indices excluded due to Rmin - double oExclHalfSpan; - int hi_m, hi_n, hi_o, outside_o; - double RplaneSquare; -}; - -class ReflectionsInQminQmax -{ -public: - ReflectionsInQminQmax( double _Qmin, double _Qmax, - const LatticeParameters& _latpar ); - ReflectionsInQminQmax( double _Qmin, double _Qmax, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - inline void rewind() - { - sph.rewind(); - } - inline void next() - { - sph.next(); - } - inline bool finished() - { - return sph.finished(); - } - // input arguments - const double Qmin, Qmax; - const LatticeParameters latpar; -private: - // sph must be initialized before hkl and h, k, l - PointsInSphere sph; -public: - // hkl array and h, k, l aliases are supposed to be read only - int *hkl; - int &h, &k, &l; - inline double Q() const - { - return 2.0*M_PI*sph.r(); - } - inline double d() const - { - return 1.0/sph.r(); - } -}; - -class ReflectionsInDmaxDmin : ReflectionsInQminQmax -{ -public: - ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - const LatticeParameters& _latpar ); - ReflectionsInDmaxDmin( double _Dmax, double _Dmin, - double _a, double _b, double _c, - double _alpha, double _beta, double _gamma ); - // input arguments - const double Dmax, Dmin; -}; - - -} // namespace NS_POINTSINSPHERE - -using NS_POINTSINSPHERE::PointsInSphere; -using NS_POINTSINSPHERE::ReflectionsInQminQmax; -using NS_POINTSINSPHERE::ReflectionsInDmaxDmin; - -#endif // POINTSINSPHERE_H_INCLUDED diff --git a/src/extensions/libpdffit2/ShapeFactors.h b/src/extensions/libpdffit2/ShapeFactors.h deleted file mode 100644 index 031efe66..00000000 --- a/src/extensions/libpdffit2/ShapeFactors.h +++ /dev/null @@ -1,43 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2007 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PDF corrections due to particle shape. -* -* Comments: -* PDF correction for spherical particles obtained from -* R.C. Howell et al, Phys. Rev. B 73, 094107 (2006) -* http://link.aps.org/abstract/PRB/v73/e094107 -* -***********************************************************************/ - -#ifndef SHAPEFACTORS_H_INCLUDED -#define SHAPEFACTORS_H_INCLUDED - -#include - -// envelope function for spherical nanoparticle with diameter d -inline double sphereEnvelope(double r, double d) -{ - double rdratio = r/d; - return (rdratio < 1.0) ? (1.0 - 1.5*rdratio + 0.5*pow(rdratio, 3)) : 0.0; -} - -// derivative of sphereEnvelope by diameter d -inline double dsphereEnvelope(double r, double d) -{ - double rdratio = r/d; - return (rdratio < 1.0) ? (1.5*rdratio/d - 1.5*pow(rdratio, 3)/d) : 0.0; -} - -#endif // SHAPEFACTORS_H_INCLUDED diff --git a/src/extensions/libpdffit2/StringUtils.cc b/src/extensions/libpdffit2/StringUtils.cc deleted file mode 100644 index 73fc04da..00000000 --- a/src/extensions/libpdffit2/StringUtils.cc +++ /dev/null @@ -1,58 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Utilities for string formatting. -* -***********************************************************************/ - -#include -#include - -#include "StringUtils.h" -#include "MathUtils.h" - -using namespace std; - -// return an uppercase copy of string s -string toupper(string s) -{ - for (string::iterator ii = s.begin(); ii != s.end(); ++ii) - { - *ii = toupper(*ii); - } - return s; -} - -// class FormatValueWithStd -string FormatValueWithStd::operator() (double x, double dx) -{ - ostringstream out(f_leading_blank ? " " : "", ios_base::app); - out << x << setprecision(f_std_precision); - // do not write dx when it is too small - if (dx > fabs(x)*1e-8) out << " (" << dx << ')'; - else if (std::isnan(dx)) out << " (NaN)"; - // left-pad string to the width - string rv = out.str(); - int rvlen = rv.size(); - // pad or prepend blanks as necessary - if (rvlen < f_width) - { - size_t nblanks = f_width - rvlen; - if (f_left) rv.append(nblanks, ' '); - else rv.insert(0, nblanks, ' '); - } - return rv; -} - -// End of file diff --git a/src/extensions/libpdffit2/StringUtils.h b/src/extensions/libpdffit2/StringUtils.h deleted file mode 100644 index edb74a96..00000000 --- a/src/extensions/libpdffit2/StringUtils.h +++ /dev/null @@ -1,71 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Utilities for string formatting. -* -***********************************************************************/ - -#ifndef STRINGUTILS_H_INCLUDED -#define STRINGUTILS_H_INCLUDED - -#include - -std::string toupper(std::string s); - -class FormatValueWithStd -{ - private: - - // Data members - int f_width; - bool f_left; - bool f_leading_blank; - int f_std_precision; - - public: - - // Constructor: - FormatValueWithStd() - { - f_width = 0; - f_left = false; - f_leading_blank = false; - f_std_precision = 2; - } - - // Methods: - std::string operator() (double x, double dx); - inline FormatValueWithStd& width(int w) - { - f_width = w; - return *this; - } - inline FormatValueWithStd& left() - { - f_left = true; - return *this; - } - inline FormatValueWithStd& right() - { - f_left = false; - return *this; - } - inline FormatValueWithStd& leading_blank(bool flag) - { - f_leading_blank = flag; - return *this; - } -}; - -#endif // STRINGUTILS_H_INCLUDED diff --git a/src/extensions/libpdffit2/exceptions.h b/src/extensions/libpdffit2/exceptions.h deleted file mode 100644 index 738ce1a6..00000000 --- a/src/extensions/libpdffit2/exceptions.h +++ /dev/null @@ -1,95 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Exceptions used in pdffit2. -* -* Comments: -* -***********************************************************************/ - -#ifndef EXCEPTIONS_H_INCLUDED -#define EXCEPTIONS_H_INCLUDED - -#include -#include - -class Exception -{ - private: - std::string msg; - public: - Exception(std::string _msg) : msg(_msg) {} - std::string GetMsg() - { - return msg; - } -}; - -//specific exceptions - mimic python names -class ValueError : public Exception -{ - public: - ValueError(std::string _msg) : Exception(_msg) {} -}; - -class unassignedError : public Exception -{ - public: - unassignedError(std::string _msg) : Exception(_msg) {} -}; - -class IOError : public Exception -{ - public: - IOError(std::string _msg) : Exception(_msg) {} -}; - -class dataError : public Exception -{ - public: - dataError(std::string _msg) : Exception(_msg) {} -}; - -class structureError : public Exception -{ - public: - structureError(std::string _msg) : Exception(_msg) {} -}; - -class constraintError : public Exception -{ - public: - constraintError(std::string _msg) : Exception(_msg) {} -}; - -class calculationError : public Exception -{ - public: - calculationError(std::string _msg) : Exception(_msg) {} -}; - -class parseError : public Exception -{ - public: - parseError(std::string _msg) : Exception(_msg) {} -}; - -//This one is used internally, and should not make it to the python layer. -class vgetException : public Exception -{ - public: - vgetException(std::string _msg) : Exception(_msg) {} -}; - -#endif // EXCEPTIONS_H_INCLUDED diff --git a/src/extensions/libpdffit2/fit.cc b/src/extensions/libpdffit2/fit.cc deleted file mode 100644 index 9bcda15f..00000000 --- a/src/extensions/libpdffit2/fit.cc +++ /dev/null @@ -1,836 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Mixed definitions of several DataSet, Fit and PdfFit methods -* -* Comments: Up to date with 1.3.10 Fortran version. -* What a spaghetti. -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "ShapeFactors.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -/************************* - Main fit routine -**************************/ -// Command called in Fortran -// Now called - -int PdfFit::refine(bool deriv, double toler) { - int finished = 0; - while( !finished ) - { - finished = refine_step(deriv, toler); - } - return 1; -} - - -// CLF Wed May 25 2005 -// Added one-step refinement so that the progress can be checked after each -// refinement step. Many parameters made into public data members of Fit. This -// function is for use in higher level refinement routines. -int PdfFit::refine_step(bool deriv, double toler) -{ - static bool fit_running = false; - const int NSTAG = 3, MINITER = 3, MAXITER = 100; - - fit_running = fit_running && (fit.iter != 0); - // If fit_running flag is down, this is the first iteration. - // If so, then set up the fit. - if(!fit_running) - { - fit.iter = 0; - fit.alambda = -1; - fit.stagnating = 0; - fit.chisq = double_max; - fit_running = true; - - *pout << - "*******************\n" << - "Starting refinement\n" << - "*******************\n"; - - for (int is=0; isiset << " Phase: "; - for (unsigned int ip=0; ippsel.size(); ip++) - if (datasets[is]->psel[ip]) *pout << phase[ip]->iphase << " "; - *pout << endl; - - } - - fit_setup(); - } - - - //------ Here starts the fitting - - // setting the offset for all refinable variables - - if( (fit.iter order = this->order_by_id(); - vector::iterator i; - int j; - for (i = order.begin(), j = 0; i != order.end(); ++i) - { - if (ip[*i]) - { - *pout << setw(4) << id[*i] << ": " << setw(9) << fixed << p[*i]; - j++; - if (j % 4) *pout << " "; - else *pout << endl; - } - } - if (j % 4) *pout << endl; - *pout << endl; - (*pout).unsetf(ios_base::fixed); -} - -/********************************************************** - Setting the offset for all refinable variables -**********************************************************/ -void PdfFit::fit_setup() -{ - // initialize the array with the addresses of refinable variable - // and initialize the offset pointers to be used in derivative routines - // also makes a vector containing the address of the error of each - // refinable variable - //int ip, ia, is, j; - int j; - - // First we make an initial fill of all constrained equations - // to detect missing parameters but mainly to detect the fixed constraints, - // i.e. constraints without parameters or with only fixed parameters - - fit.fill_variables(); - - // for each refinable variable detect the corresponding constraint - - fit.refvar.clear(); - fit.sdptr.clear(); - - for (int ip=0; ipphase[ip]; - - phase.offset = fit.refvar.size(); - - for (j=0;j<3;j++) - { - fit.refvar.push_back(fit.vfind(phase.a0[j])); - fit.sdptr.push_back(&phase.da0[j]); - } - for (j=0;j<3;j++) - { - fit.refvar.push_back(fit.vfind(phase.win[j])); - fit.sdptr.push_back(&phase.dwin[j]); - - } - fit.refvar.push_back(fit.vfind(phase.delta2)); - fit.sdptr.push_back(&phase.ddelta2); - - fit.refvar.push_back(fit.vfind(phase.delta1)); - fit.sdptr.push_back(&phase.ddelta1); - - fit.refvar.push_back(fit.vfind(phase.pscale)); - fit.sdptr.push_back(&phase.dpscale); - - fit.refvar.push_back(fit.vfind(phase.spdiameter)); - fit.sdptr.push_back(&phase.dspdiameter); - - fit.refvar.push_back(fit.vfind(phase.sratio)); - fit.sdptr.push_back(&phase.dsratio); - - for (int ia=0; iadatasets[is]; - - ds.offset = fit.refvar.size(); - - fit.refvar.push_back(fit.vfind(ds.dscale)); - fit.sdptr.push_back(&ds.ddscale); - - fit.refvar.push_back(fit.vfind(ds.qdamp)); - fit.sdptr.push_back(&ds.dqdamp); - - fit.refvar.push_back(fit.vfind(ds.qbroad)); - fit.sdptr.push_back(&ds.dqbroad); - } - - // maximum number of refinable variables - int maxvar = fit.refvar.size(); - - // fill the vector pointing from available refinable variables to - // actual constrained variables - - if (maxvar != getnpar() ) - { - throw constraintError("Parameter set but not constrained."); - } - - fit.ndof = 0; - - for (int i=0; idatasets.empty()) - { - throw unassignedError("Space for calculation must be alloc'ed first"); - } - fit_theory(false, true); - *pout << "\n================================== DONE =================================\n"; - return; -} - -/*********************************************************** - Here we calculate PDF and derivatives during LS fit - (previously known as fit_theory) -************************************************************/ -void PdfFit::fit_theory(bool ldiff, bool lout) -{ - int is, ip, ia, i; - - -// ------ First we compute all constrained equations and the PDF - - fit.fill_variables(); - - // reposition atoms in the elementary unit cells - // Check if this is the correct wayto do things - for (ip=0; ipnatoms; ia++) - { - for(i=0; i<3; i++) - { - phase[ip]->atom[ia].pos[i] = fmod(phase[ip]->atom[ia].pos[i], phase[ip]->icc[i]); - } - } - } - - for (ip=0; iplattice(); - - // determine pdf for each dataset - fit.ntot = 0; - fit.wnorm = 0.0; - - for (is=0; isdatasets[is]; - - ds.determine(ldiff, lout, fit); - - // compute variables for reduced chi-squared and Rw - fit.ntot += ds.nfmax - ds.nfmin + 1; - fit.wnorm += ds.weighedSquareObs(); - } -} - - -double PdfFit::totalWeighedSquareObs() const -{ - return fit.wnorm; -} - - -int PdfFit::totalReducedObservations() const -{ - return fit.ntot - fit.ndof; -} - - -/*********************************************************************** - This routine sets up the matrix A with the derivatives d(PDF)/dx -************************************************************************/ - -void DataSet::fit_setup_derivatives(Fit &fit) -{ - int i, j, ia, ipar, offset; - unsigned int ip; - double fac, facs, facp, ddrho; - double r, bk; - fac = facs = facp = ddrho = r = bk = 0; - - DataSet& ds = *this; - - //------ Loop over all data points - - for (i = ds.ncmin; i <= ds.ncmax; i++) - { - // --- Some common variables - - r = i*ds.deltar + ds.rmin; - - // background envelope due to Q resolution - bk = (ds.qdamp > 0.0) ? exp(-sqr(r*ds.qdamp)/2.0) : 1.0; - - - //------ ---------------------------------------------------------------- - //------ Derivatives per atom : x,y,z,u,o - //------ ---------------------------------------------------------------- - - for (ip=0; ip 0.0 && r > phase.stepcut) - { - shape_env = 0.0; - } - - facp = phase.pscale * shape_env * ds.dscale * bk; - facs = 1.0 / (phase.np*r); - fac = facs*facp; - - for (ia=0; ia, so every contribution to - // the pdf contributes to the derivatives - ds.fit_a[i][ipar] += phase.pscale * ds.dscale * - (1.0 - 2.0 * atom.weight) / phase.np * - (calc[i][ip] + - 4.0*M_PI * r * phase.rho0 * phase.dnorm * bk * shape_env); - } - } - - //------ ---------------------------------------------------------------- - //------ Derivatives per phase : lat, delta2, pscale, spdiameter, sratio - //------ ---------------------------------------------------------------- - - // ----- ----- d/d(lat[j] for j=1,2,3) - - offset = phase.offset; - - for (j=0;j<3;j++) - { - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0/phase.a0[j]); - } - - // ----- ----- d/d(lat[4]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* - rad*phase.sina*(phase.cosa - phase.cosb*phase.cosg); - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); - } - - // ----- ----- d/d(lat[5]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* - rad*phase.sinb*(phase.cosb - phase.cosa*phase.cosg); - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); - } - - // ----- ----- d/d(lat[6]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - ddrho = sqr(phase.a0[0]*phase.a0[1]*phase.a0[2]/phase.v)* - rad*phase.sing*(phase.cosg - phase.cosa*phase.cosb); - ds.fit_a[i][ipar] = facp*(facs*ds.fit_a[i][ipar] + - 4.0*M_PI*r*phase.dnorm*phase.rho0*ddrho); - } - - // ----- ----- d/d(delta2[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - - - // ----- ----- d/d(delta1[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - - //----- ----- d/d(pscale[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] = ds.calc[i][ip] * ds.dscale; - - // ----- --- d/d(spdiameter) - if ( (ipar=fit.refvar[offset++]) != -1) - { - ds.fit_a[i][ipar] = (phase.spdiameter <= 0.0) ? 0.0 : - ds.calc[i][ip] * ds.dscale * phase.pscale * - dsphereEnvelope(r, phase.spdiameter) / - ((shape_env > 0.0) ? shape_env : 1.0); - } - - // ----- ----- d/d(sratio[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - } - - //------ ---------------------------------------------------------------- - //------ Derivatives per dataset : dscale, qdamp, qbroad - //------ ---------------------------------------------------------------- - - offset = ds.offset; - - // ----- --- d/d(dscale[is]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] = ds.pdftot[i] / ds.dscale; - - // ----- --- d/d(qdamp[is]) - - if ( (ipar=fit.refvar[offset++]) != -1) - { - if (ds.qdamp > 0.0) - ds.fit_a[i][ipar] = -r*r * ds.qdamp * ds.pdftot[i]; - else - ds.fit_a[i][ipar] = 0; - } - - // ----- --- d/d(qbroad[ip]) - - if ( (ipar=fit.refvar[offset++]) != -1) - ds.fit_a[i][ipar] *= fac; - - } - -//------ Finally we need to apply Qmax cutoff on the derivatives - - if (ds.qmax > 0.0) - { - int nclen = ds.ncmax + 1 - ds.ncmin; - // matrix column is not a continuous data block, a copy is required - valarray col_ip_array(nclen); - double* col_ip = &(col_ip_array[0]); - for(ip=0; ip::iterator apos; - apos = find(var.begin(), var.end(), &a); - if (apos == var.end()) return -1; - // variable is found here, now check if it is refinable - int idx = apos - var.begin(); - return vref[idx] ? idx : -1; -} - - -void Fit::constrain(double &a, string inpform, fcon f, int ipar, FCON type) -{ - int ivar; - if ( (ivar=vfind(a)) != -1) - { - form[ivar] = inpform; - fconstraint[ivar] = f; - idef[ivar] = ipar; - ctype[ivar] = type; - vref[ivar] = true; - *pout << "Warning: replacing existing constraint\n\n"; - } - else - { - var.push_back(&a); - form.push_back(inpform); - fconstraint.push_back(f); - idef.push_back(ipar); - ctype.push_back(type); - vref.push_back(true); - } -} - - -void Fit::constrain(double &a, string inpform) -{ - constrain(a, inpform, NULL, -1, USER); -} - -void Fit::constrain(double &a, fcon f ) -{ - constrain(a, string(), f, -1, USER); -} - -// if a # is passed instead of a function, then the default function will be used -// which is just var = p[ipar] -void Fit::constrain(double &a, int ipar) -{ - constrain(a, ipar, IDENT); -} - -// if a # and the FCOMP-type are passed instead of a function, then the -// complement function will be used: -// which is just var = 1-p[ipar] -void Fit::constrain(double &a, int ipar, FCON type) -{ - if ( (type == IDENT) || (type == FCOMP) || (type == FSQR) ) - constrain(a, string(), NULL, ipar, type); - else - throw constraintError("Unknown constraint"); -} - -void Fit::fill_variables() -{ - dvdp.resize(var.size(),p.size()); - - for (unsigned int i=0; i dnumdp; - - *var[i] = parse(form[i],dnumdp); - - // store numerical derivatives - for(unsigned int iu=0; iuip[ip]; - - // calculate derivative wrt to p[ip] if parameter is free - if (this->ip[ip]) - { - dvdp[i][ip] = dnumdp[iu]; - } - } - } - else if (f) - { - //try - //{ - vector dvdp_i(dvdp.rowVector(i)); - *var[i] = f(p, dvdp_i); - copy(dvdp_i.begin(), dvdp_i.end(), dvdp[i]); - for(int ipar=0; iparip[ipar]); - } - } - else - { - int ipar = parfind(idef[i]); - - if (ipar == -1) - { - ostringstream msg; - msg << "parameter " << idef[i] << " undefined"; - throw constraintError( msg.str() ); - } - - // constraint is fixed if parameter ipar is fixed - vref[i] = this->ip[ipar]; - - if (ctype[i] == IDENT) - { - *var[i] = p[ipar]; - dvdp[i][ipar] = 1.0; - } - else if (ctype[i] == FCOMP) - { - *var[i] = 1.0 - p[ipar]; - dvdp[i][ipar] = -1.0; - } - else if (ctype[i] == FSQR) - { - *var[i] = sqr(p[ipar]); - dvdp[i][ipar] = 2.0*p[ipar]; - } - } - } -} - -int Fit::parfind(unsigned int pidx) -{ - // find the position of pidx in parameter indices vector id - // return -1 if not found - vector::iterator pos; - pos = find(id.begin(), id.end(), pidx); - if (pos == id.end()) - { - return -1; - } - return int(pos - id.begin()); -} - -void Fit::setpar(unsigned int pidx, double val) -{ - int ipar = parfind(pidx); - if (ipar != -1) - { - p[ipar] = val; - } - else - { - p.push_back(val); - ip.push_back(1); // select refinement "ON" when par gets defined - id.push_back(pidx); // store the parameter identifier - } -} - -double Fit::getpar(unsigned int pidx) -{ - int ipar = parfind(pidx); - if (ipar < 0) - { - ostringstream msg; - msg << "Parameter " << pidx << " does not exist"; - throw unassignedError( msg.str() ); - } - return p[ipar]; -} - -void Fit::fixpar(int pidx) -{ - if (pidx == ALL) - { - fill(ip.begin(), ip.end(), false); - return; - } - int ipar = parfind(pidx); - if (ipar == -1) - { - ostringstream emsg; - emsg << "Parameter " << pidx << " not defined."; - throw unassignedError(emsg.str()); - } - ip[ipar] = false; -} - -void Fit::freepar(int pidx) -{ - if (pidx == ALL) - { - fill(ip.begin(), ip.end(), true); - return; - } - int ipar = parfind(pidx); - if (ipar == -1) - { - ostringstream emsg; - emsg << "Parameter " << pidx << " not defined."; - throw unassignedError(emsg.str()); - } - ip[ipar] = true; -} - -/************************************************************************** - This routine calculates errors dx from dp ... - - The covariance of the constrained variables is given by the left and right - matrix multiplication of the dvdp matrix with the covariance matrix - (based on a Taylor expansion of each constraint around the mean parameter values). - The old Fortran program had a sqrt(sum of squares) as error. This - does not take into account parameter correlations, and implicitly considers - the parameters uncorrelated, which is an under-estimation of the parameters. -****************************************************************************/ -void PdfFit::fit_errors() -{ - int ip; - matrix dvdpt = fit.dvdp.transposed(); - - // compute the errors on the parameters as sqrt of diagonal elements of - // covariance matrix - fit.dp = fit.covar.sd(); - - // compute errors on refined variables: left and right matrix multiplication - // of covariance matrix with dvdp - fit.vcovar = fit.dvdp * fit.covar * dvdpt; - - fit.dvar = fit.vcovar.sd(); - - //for(int i=0;ilattice(); -} - -/*********************************************************************** - This routine converts the errors on the constraints to - errors on the actual pdf-paramters -************************************************************************/ - -void Fit::fill_errors() -{ - // transfers the errors on the constrained variables to the corresponding - // pdf error-variables - - int icon; - - // loop over all refinable variables and transfer the sd on any constrained - // variable into the sd on the refinable variable - for (unsigned int i=0; i= big) - { - big=fabs(a[j][k]); - irow=j; - icol=k; - } - } - } - } - } - ++(ipiv[icol]); - /*We now have the pivot element, so we interchange rows, if needed, to put the pivot - element on the diagonal. The columns are not physically interchanged, only relabeled: - indxc[i], the column of the ith pivot element, is the ith column that is reduced, while - indxr[i] is the row in which that pivot element was originally located. If indxr[i] - != indxc[i] there is an implied column interchange. With this form of bookkeeping, the - solution b's will end up in the correct order, and the inverse matrix will be scrambled - by columns.*/ - if (irow != icol) { - for (l=1;l<=n;l++) swap(a[irow][l],a[icol][l]); - for (l=1;l<=m;l++) swap(b[irow][l],b[icol][l]); - } - indxr[i]=irow; // We are now ready to divide the pivot row by the - // pivot element, located at irow and icol. - indxc[i]=icol; - - // Indices of a start at 1, make sure we don't reference invalid - // index of a. When icol is 0, all checked elements of the matrix - // a were zero and it is probably singular as well. - if (icol == 0 || a[icol][icol] == 0.0) - { - throw calculationError("Singular matrix during minimization"); - } - pivinv=1.0/a[icol][icol]; - a[icol][icol]=1.0; - for (l=1;l<=n;l++) a[icol][l] *= pivinv; - for (l=1;l<=m;l++) b[icol][l] *= pivinv; - for (ll=1;ll<=n;ll++) // Next, we reduce the rows... - if (ll != icol) { // ...except for the pivot one, of course. - dum=a[ll][icol]; - a[ll][icol]=0.0; - for (l=1;l<=n;l++) a[ll][l] -= a[icol][l]*dum; - for (l=1;l<=m;l++) b[ll][l] -= b[icol][l]*dum; - } - } - /*This is the end of the main loop over columns of the reduction. It only remains to unscram- - ble the solution in view of the column interchanges. We do this by interchanging pairs of - columns in the reverse order that the permutation was built up.*/ - for (l=n;l>=1;l--) - { - if (indxr[l] == indxc[l]) continue; - for (k=1;k<=n;k++) swap(a[k][indxr[l]],a[k][indxc[l]]); - } // And we are done. - free_ivector(ipiv,1,n); - free_ivector(indxr,1,n); - free_ivector(indxc,1,n); -} - -// End of file diff --git a/src/extensions/libpdffit2/matrix.h b/src/extensions/libpdffit2/matrix.h deleted file mode 100644 index bc80b8ca..00000000 --- a/src/extensions/libpdffit2/matrix.h +++ /dev/null @@ -1,239 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* template class matrix -* -* Comments: optimized from original vector of vectors -* -***********************************************************************/ - -#ifndef MATRIX_H_INCLUDED -#define MATRIX_H_INCLUDED - -#include -#include -#include - -#include "OutputStreams.h" -using NS_PDFFIT2::pout; - -template class matrix -{ - private: - - // Data Methods - T* mdata; - size_t mrows; - size_t mcols; - size_t msize; - - public: - - // Constructors - matrix() : - mdata(NULL), mrows(0), mcols(0), msize(0) - { } - matrix(const matrix& src) : - mdata(new T[src.mrows*src.mcols]), - mrows(src.mrows), mcols(src.mcols), msize(src.msize) - { - std::copy(src.mdata, src.mdata + src.msize, mdata); - } - matrix(size_t m, size_t n) : - mrows(m), mcols(n), msize(mrows*mcols) - { - mdata = new T[mrows*mcols]; - std::fill(mdata, mdata + msize, T(0)); - } - // Destructor - ~matrix() - { - delete[] mdata; - } - // Methods - matrix& operator=(const matrix& src) - { - if (this == &src) return *this; - delete[] mdata; - mdata = new T[src.msize]; - std::copy(src.mdata, src.mdata + src.msize, mdata); - mrows = src.mrows; - mcols = src.mcols; - msize = src.msize; - return *this; - } - matrix& operator=(T value) - { - std::fill_n(mdata, msize, value); - return *this; - } - void resize(size_t m, size_t n, T value=T(0)) - { - if (m == mrows && n == mcols) return; - T* resized = new T[m*n]; - std::fill(resized, resized + m*n, value); - for ( size_t i = 0, offset = 0; - i != std::min(m, mrows); ++i, offset += n ) - { - for (size_t j = 0; j != std::min(n, mcols); ++j) - { - resized[offset+j] = (*this)(i, j); - } - } - delete[] mdata; - mdata = resized; - mrows = m; - mcols = n; - msize = m*n; - } - void clear() - { - delete[] mdata; - mdata = NULL; - mrows = mcols = msize = 0; - } - std::vector rowVector(size_t i) - { - return std::vector(mdata + mcols*i, mdata + mcols*(i+1)); - } - std::vector colVector(size_t j) - { - std::vector column(mrows); - typename std::vector::iterator vii; - vii = column.begin(); - T* pt = mdata + j; - for (; vii != column.end(); ++vii, pt += mcols) *vii = *pt; - return column; - } - inline size_t getrows() - { - return mrows; - } - inline size_t getcols() - { - return mcols; - } - inline T* operator[](size_t i) - { - return mdata + mcols*i; - } - inline T& operator()(size_t i, size_t j) - { - return *(mdata + i*mcols + j); - } - matrix transposed() - { - matrix mxt(mcols, mrows); - T* pt = mxt.mdata; - for (size_t j = 0; j != mcols; ++j) - { - for (size_t i = 0; i != mrows; ++i, ++pt) - { - *pt = (*this)(i, j); - } - } - return mxt; - } - // returns standard deviation vector from covariance matrix - std::vector sd() - { - std::vector v(mcols); - if (mcols != mrows) - { - const char* emsg = "Matrix not square in "; - throw emsg; - } - typename std::vector::iterator vii; - vii = v.begin(); - for (T* pii = mdata; pii < mdata + msize; pii += mcols + 1, ++vii) - { - *vii = sqrt(*pii); - } - return v; - } - matrix operator*(matrix& B) - { - matrix& A = *this; - matrix C(A.mrows, B.mcols); - if (A.mcols != B.mrows) - { - const char* emsg = "Inconsistent matrix multiplication"; - throw emsg; - } - for (size_t i = 0; i != A.mrows; ++i) - { - for (size_t j = 0; j != B.mcols; ++j) - { - T& Cij = C(i,j); - Cij = 0; - for (size_t k = 0; k != A.mcols; ++k) - { - Cij += A(i,k)*B(k,j); - } - } - } - return C; - } - template - friend std::ostream& operator<<(std::ostream &out, matrix &mx); - void print() - { - using namespace std; - for (size_t i = 0; i != mrows; ++i) - { - *pout << i << ": "; - for (size_t j = 0; j != mcols; ++j) - { - *pout << (*this)(i,j) << " "; - } - *pout << endl; - } - } -}; - -template -std::ostream &operator<<(std::ostream &out, std::vector &v) -{ - using namespace std; - out << "("; - for (size_t i=0; i != v.size(); ++i) - { - out << v[i]; - if (i != (v.size()-1)) out << ", "; - else out << ")\n"; - } - return out; -} - -template -std::ostream& operator<<(std::ostream &out, matrix &mx) -{ - using namespace std; - out << "( "; - for (size_t i = 0; i != mx.mrows; ++i) - { - out << "("; - for (size_t j = 0; j != mx.mcols; ++j) - { - *pout << mx(i,j); - if (j != (mx.mcols-1)) *pout << ", "; - else *pout << ")"; - } - if (i != (mx.mrows-1)) *pout << ", "; - else *pout << " )\n"; - } - return out; -} - -#endif // MATRIX_H_INCLUDED diff --git a/src/extensions/libpdffit2/metric.cc b/src/extensions/libpdffit2/metric.cc deleted file mode 100644 index 5c06c4f5..00000000 --- a/src/extensions/libpdffit2/metric.cc +++ /dev/null @@ -1,341 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Definitions of several Phase methods -* -* Comments: -* -***********************************************************************/ - -#include - -#include "MathUtils.h" -#include "StringUtils.h" -#include "pdffit.h" -using NS_PDFFIT2::pout; - -/********************************************************************* - Calculates lattice constants, metric and reciprocal metric - tensor, permutation tensors and unit cell volume. - It's done quite some old fashioned way, rather than calculating - the direct metric tensor and its inverse. - - This extended version calculates standard deviations as well - **********************************************************************/ -void Phase::lattice() -{ - double abscosa, abscosb, abscosg, arg, darg; - double dcosa, dcosb, dcosg, voll, dvoll; - double cos1, cos2, cosi, sin1, sin2, sini; - double dcos1, dcos2, dcosi, dsin1, dsin2, dsini; - int i, i1, i2, j, k, ncc; - - cosa = cosd(win[0]); - cosb = cosd(win[1]); - cosg = cosd(win[2]); - - sina = sind(win[0]); - sinb = sind(win[1]); - sing = sind(win[2]); - - abscosa = fabs(cosa); - abscosb = fabs(cosb); - abscosg = fabs(cosg); - - dcosa = fabs(sina*rad*dwin[0]); - dcosb = fabs(sinb*rad*dwin[1]); - dcosg = fabs(sing*rad*dwin[2]); - - voll = 1.0 - sqr(cosa) - sqr(cosb) - sqr(cosg) + 2.0*cosa*cosb*cosg; - - if (voll <= double_eps) - { - throw structureError("Unit cell volume is not positive."); - } - v = sqrt(voll)*a0[0]*a0[1]*a0[2]; - - dvoll = 2.0*(abscosa*dcosa + abscosb*dcosb + abscosg*dcosg + - dcosa*abscosb*abscosg + abscosa*dcosb*abscosg + abscosa*abscosb*dcosg); - dv = 0.5/sqrt(voll)*dvoll*a0[0]*a0[1]*a0[2] - + sqrt(voll)*(da0[0]*a0[1]*a0[2] + a0[0]*da0[1]*a0[2] + a0[0]*a0[1]*da0[2]); - - vr = 1.0/v; - dvr = 1.0/(v*v)*dv; - - //------ - calculate direct metric tensor - - tensor(gten,a0,win); - dtensor(a0,win,dgten,da0,dwin); - - //------ - calculate reciprocal lattice constants - - // WHY ARE THERE NO ABSOLUTE VALUES IN THE FOLLOWING FORMULAE FOR THE STANDARD - // DEVIATIONS?? - for (i=0; i<3; i++) // i = 0,1,2 - { - i1 = (i+1) % 3; // i1 = 1,2,0 - i2 = (i+2) % 3; // i2 = 2,0,1 - - cos1 = cosd(win[i1]); - cos2 = cosd(win[i2]); - cosi = cosd(win[i]); - sin1 = sind(win[i1]); - sin2 = sind(win[i2]); - sini = sind(win[i]); - - ar[i] = a0[i1]*a0[i2]*sini/v; - arg = (cos1*cos2-cosi)/(sin1*sin2); - wrez[i] = acosd(arg); - - dcos1 = sin1*rad*dwin[i1]; - dcos2 = sin2*rad*dwin[i2]; - dcosi = sini*rad*dwin[i]; - dsin1 = cos1*rad*dwin[i1]; - dsin2 = cos2*rad*dwin[i2]; - dsini = cosi*rad*dwin[i]; - - dar[i] = ( (da0[i1]*a0[i2] + a0[i1]*da0[i2])*sini + - a0[i1]*a0[i2]*dsini) /v + a0[i1]*a0[i2]*sini/(v*v)*dv; - darg = (dcos1*cos2 + cos1*dcos2 + dcosi)/(sin1*sin2) - + arg/sin1*dsin1 + arg/sin2*dsin2; - dwrez[i] = 1./sqrt(1-arg*arg)*darg/rad; - } - - //------ - calculate reciprocal tensor - - tensor(rten,ar,wrez); - dtensor(ar,wrez,drten,dar,dwrez); - - //------ - calculate permutation tensors - - for (i=0; i<3; i++) - { - for (j=0; j<3; j++) - { - for (k=0; k<3; k++) - { - eps(i,j,k) = 0.0; - reps(i,j,k) = 0.0; - deps(i,j,k) = 0.0; - dreps(i,j,k) = 0.0; - } - } - } - - eps(0,1,2) = v; - eps(1,2,0) = v; - eps(2,0,1) = v; - eps(0,2,1) = -v; - eps(2,1,0) = -v; - eps(1,0,2) = -v; - reps(0,1,2) = vr; - reps(1,2,0) = vr; - reps(2,0,1) = vr; - reps(0,2,1) = -vr; - reps(2,1,0) = -vr; - reps(1,0,2) = -vr; - - deps(0,1,2) = dv; - deps(1,2,0) = dv; - deps(2,0,1) = dv; - deps(0,2,1) = -dv; - deps(2,1,0) = -dv; - deps(1,0,2) = -dv; - dreps(0,1,2) = dvr; - dreps(1,2,0) = dvr; - dreps(2,0,1) = dvr; - dreps(0,2,1) = -dvr; - dreps(2,1,0) = -dvr; - dreps(1,0,2) = -dvr; - - //------ - Calculate number density - - np = 0.0; - dnp = 0.0; - - for (i=0; i -#include - -const int getNR_END() -{ - return 1; -} - -static void nrerror(char error_text[]) - /* Numerical Recipes standard error handler */ -{ - fprintf(stderr,"Numerical Recipes run-time error...\n"); - fprintf(stderr,"%s\n",error_text); - fprintf(stderr,"...now exiting to system...\n"); - exit(1); -} - -template T *_vector(long nl, long nh) - /* allocate a vector with subscript range v[nl..nh] */ -{ - T *v = NULL; - if (nl > nh) return v; - v=(T *)malloc((size_t) ((nh-nl+1+getNR_END())*sizeof(T))); - if (!v) nrerror("allocation failure in _vector()"); - return v-nl+getNR_END(); -} - -double *dvector(long nl, long nh) - /* allocate a double vector with subscript range v[nl..nh] */ -{ - return _vector(nl, nh); -} - -int *ivector(long nl, long nh) - /* allocate an int vector with subscript range v[nl..nh] */ -{ - return _vector(nl, nh); -} - -template void _free_vector(T *v, long nl, long nh) - /* free a vector allocated with vector() */ -{ - if (nl > nh) return; - free((T*) (v+nl-getNR_END())); -} - -void free_dvector(double *v, long nl, long nh) - /* free a double vector allocated with vector() */ -{ - _free_vector(v, nl, nh); -} - - -void free_ivector(int *v, long nl, long nh) - /* free an int vector allocated with ivector() */ -{ - _free_vector(v, nl, nh); -} - -template T **_matrix(long nrl, long nrh, long ncl, long nch) - /* allocate a matrix with subscript range m[nrl..nrh][ncl..nch] */ -{ - long i, nrow=nrh-nrl+1,ncol=nch-ncl+1; - T **m = NULL; - if (nrl > nrh || ncl > nch) return m; - - /* allocate pointers to rows */ - m=(T **) malloc((size_t)((nrow+getNR_END())*sizeof(T*))); - if (!m) nrerror("allocation failure 1 in matrix()"); - m += getNR_END(); - m -= nrl; - /* allocate rows and set pointers to them */ - m[nrl]=(T *) malloc((size_t)((nrow*ncol+getNR_END())*sizeof(T))); - if (!m[nrl]) nrerror("allocation failure 2 in matrix()"); - m[nrl] += getNR_END(); - m[nrl] -= ncl; - for(i=nrl+1;i<=nrh;i++) m[i]=m[i-1]+ncol; - /* return pointer to array of pointers to rows */ - return m; -} - -double **dmatrix(long nrl, long nrh, long ncl, long nch) - /* allocate a double matrix with subscript range m[nrl..nrh][ncl..nch] */ -{ - return _matrix(nrl, nrh, ncl, nch); -} - -template void _free_matrix(T **m, long nrl, long nrh, long ncl, long nch) - /* free a double matrix allocated by matrix() */ -{ - if (nrl > nrh || ncl > nch) return; - free((T*) (m[nrl]+ncl-getNR_END())); - free((T**) (m+nrl-getNR_END())); -} - -void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch) - /* free a double matrix allocated by matrix() */ -{ - _free_matrix(m, nrl, nrh, ncl, nch); -} - -// End of file diff --git a/src/extensions/libpdffit2/nrutil.h b/src/extensions/libpdffit2/nrutil.h deleted file mode 100644 index fca40510..00000000 --- a/src/extensions/libpdffit2/nrutil.h +++ /dev/null @@ -1,34 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Utilities from numerical recipes. -* -* Comments: -* -***********************************************************************/ - -#ifndef NRUTIL_H_INCLUDED -#define NRUTIL_H_INCLUDED - -#include - -void nrerror(char error_text[]); -int *ivector(long nl, long nh); -double *dvector(long nl, long nh); -double **dmatrix(long nrl, long nrh, long ncl, long nch); -void free_ivector(int *v, long nl, long nh); -void free_dvector(double *v, long nl, long nh); -void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch); - -#endif // NRUTIL_H_INCLUDED diff --git a/src/extensions/libpdffit2/output.cc b/src/extensions/libpdffit2/output.cc deleted file mode 100644 index 36928794..00000000 --- a/src/extensions/libpdffit2/output.cc +++ /dev/null @@ -1,350 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Output methods for Phase, DataSet and Fit classes -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#include "pdffit.h" -#include "StringUtils.h" - -/************************************************************ - * Outputs phase information for phase 'ipha' on file 'id' - * Thu Oct 13 2005 - CLF Modified code to handle - * general types of streams. - *************************************************************/ -void Phase::output(ostream &fout) -{ - FormatValueWithStd value_std; - value_std.left(); - - fout << " " << string(78,'-') << '\n' - << " PHASE " << iphase << " : " << name << '\n' - << " " << string(78,'-') << endl; - - fout << " Scale factor : " << - value_std(pscale, dpscale) << endl; - - fout << " Particle diameter : "; - if (spdiameter <= 0.0) fout << "not applied\n"; - else fout << value_std(spdiameter, dspdiameter) << " A\n"; - - fout << " Step cutoff : "; - if (stepcut <= 0.0) fout << "not applied\n"; - else fout << value_std(stepcut, 0.0) << " A\n"; - - if (corr_max > 0.0) - { - fout << " Correlation limit [A] : " << corr_max << endl; - } - - fout << " Quad. corr. factor : " - << value_std(delta2, ddelta2) << endl; - - fout << " Lin. corr. factor : " - << value_std(delta1, ddelta1) << endl; - - fout << " Low r sigma ratio : " << value_std(sratio, dsratio) << '\n' - << " R cutoff [A] : " << value_std(rcut, 0.0) << endl; - - value_std.leading_blank(true).left(); - fout << " Lattice parameters :" - << value_std.width(20)(a0[0], da0[0]) - << value_std.width(20)(a0[1], da0[1]) - << value_std.width(0)(a0[2], da0[2]) << '\n'; - - fout << " & angles :" - << value_std.width(20)(win[0], dwin[0]) - << value_std.width(20)(win[1], dwin[1]) - << value_std.width(0)(win[2], dwin[2]) << '\n'; - - fout << endl; - - fout << " Atom positions & occupancies :" << endl; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - fout << " " - << setw(4) << left << toupper(ai->atom_type->symbol) << setw(0); - value_std.width(20); - for (int i = 0; i < 3; i++) - { - fout << value_std(ai->pos[i], ai->dpos[i]); - } - fout << value_std.width(0)(ai->occ,ai->docc) << endl; - } - fout << endl; - - fout << " Anisotropic temperature factors :" << endl; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - fout << " " << setw(4) << toupper(ai->atom_type->symbol); - for (int i = 0; i < 3; i++) - { - fout << value_std.width(i == 2 ? 0 : 20)(ai->u[i], ai->du[i]); - } - fout << endl; - if ( ai->u[3] || ai->u[4] || ai->u[5]) - { - fout << " "; - for (int i = 3; i < 6; i++) - { - fout << value_std.width(i == 5 ? 0 : 20)(ai->u[i], ai->du[i]); - } - fout << endl; - } - } -} - -string DataSet::selectedAtomsString(int ip, char ijchar) -{ - if (!psel[ip]) return string(""); - if (ijchar != 'i' && ijchar != 'j') - { - ostringstream emsg; - emsg << "Invalid value of ijchar '" << ijchar << "'"; - throw ValueError(emsg.str()); - } - // build string of selected indices per each atom type - // also check if any type is selected and ignored at the same time - map selidxstr; - set ignored_types; - Phase* ph = psel[ip]; - set& ignored = ijchar == 'i' ? phase_ignore_i[ph] : phase_ignore_j[ph]; - for (int aidx = 0; aidx < ph->natoms; ++aidx) - { - const AtomType* atp = ph->atom[aidx].atom_type; - if (ignored.count(aidx)) ignored_types.insert(atp); - else - { - ostringstream sidx; - sidx << ' ' << aidx + 1; - selidxstr[atp] += sidx.str(); - } - } - ostringstream ssel; - for ( vector::iterator atp = ph->atom_types.begin(); - atp != ph->atom_types.end(); ++atp ) - { - if (!selidxstr.count(*atp)) continue; - ssel << " " << toupper((*atp)->symbol); - if (ignored_types.count(*atp)) ssel << selidxstr[*atp]; - } - return ssel.str(); -} - -/*********************************************************** - Outputs information about this data set - Thu Oct 13 2005 - CLF - Modified code to handle general types of - streams. -************************************************************/ -void DataSet::output(ostream& fout) -{ - FormatValueWithStd value_std; - - fout << " " << string(78,'-') << '\n' - << " DATA SET : " << iset << " (" << name << ")" << '\n' - << " " << string(78,'-') << endl; - - fout << " Data range in r [A] : " << setw(8) << left << rmin << " -> " - << setw(8) << rmax << " Step dr : " << setw(0) << deltar << endl; - - fout << " Calculated range : " << setw(8) << rcmin << " -> " - << setw(0) << rcmax << endl; - - fout << " Refinement r range : " << setw(8) << rfmin << " -> " - << setw(8) << rfmax - << " Data pts : " << setw(5) << nfmin << " -> " - << setw(0) << nfmax << endl; - - fout << - " Reduced chi squared : " << this->getdsredchisq() << '\n' << - " Rw - value : " << this->getdsrw() << '\n' << endl; - - fout << endl << " Experimental settings :" << endl; - - if (scattering_type == 'X') - fout << " Radiation : X-Rays\n"; - else - fout << " Radiation : Neutrons\n"; - - if (qmax <= 0.0) - fout << " Termination at Qmax : not applied\n"; - else - fout << " Termination at Qmax : " << qmax << " A**-1\n"; - - if (qdamp <= 0.0) - fout << " DQ dampening Qdamp : not applied\n"; - else - fout << " DQ dampening Qdamp : " << value_std(qdamp, dqdamp) << " A**-1\n"; - - if (qbroad <= 0.0) - fout << " DQ broadening Qbroad : not applied\n"; - else - fout << " DQ broadening Qbroad : " << value_std(qbroad, dqbroad) << " A**-1\n"; - - fout << " Scale factor : " << value_std(dscale, ddscale) << endl; - - fout << endl; - - fout << " Selected phases and atoms for this data set :\n"; - - for(size_t ip = 0; ip != psel.size(); ip++) - { - if (!psel[ip]) continue; - fout << " Phase " << ip+1 << " :\n"; - - fout << " Atoms (i) :"; - fout << selectedAtomsString(ip, 'i') << '\n'; - fout << " Atoms (j) :"; - fout << selectedAtomsString(ip, 'j') << '\n'; - } - fout << '\n'; - - fout << " Relative phase content in terms of\n"; - fout << " atoms unit cells mass\n"; - vector< pair > atomfractions; - vector< pair > cellfractions; - vector< pair > massfractions; - atomfractions = getAtomPhaseFractions(); - cellfractions = getCellPhaseFractions(); - massfractions = getMassPhaseFractions(); - for(size_t ip = 0; ip != psel.size(); ip++) - { - fout << " Phase " << ip + 1 << " :"; - value_std.left().width(24).leading_blank(true); - fout << value_std(atomfractions[ip].first, atomfractions[ip].second); - fout << value_std(cellfractions[ip].first, cellfractions[ip].second); - value_std.width(0); - fout << value_std(massfractions[ip].first, massfractions[ip].second); - fout << '\n'; - } - fout << endl; -} - -/************************************************* - Outputs parameter information - Thu Oct 13 2005 - CLF - Modified code to handle general types of - streams. -**************************************************/ -void Fit::output(ostream &fout) -{ - fout << " " << string(78,'-') << '\n' - << " PARAMETER INFORMATION :" << '\n' - << " " << string(78,'-') << endl; - - int npar = 0; - - for (int i=0; i order = this->order_by_id(); - vector::iterator i; - for (i = order.begin(); i != order.end(); ++i) - { - int nword = i - order.begin(); - bool lastword = (nword + 1) % 3 == 0 || nword + 1 == psize(); - double dpi = ip[*i] ? dp[*i] : 0.0; - fout << right << ' ' << setw(3) << id[*i] << setw(0) << ":" - << value_std.width(lastword ? 0 : 20)(p[*i], dpi); - fout << (lastword ? "\n" : " "); - } - - fout << " " << string(78,'-') << '\n' - << " REFINEMENT INFORMATION:\n" - << " " << string(78,'-') << endl; - - fout << " Number of iterations : " << iter << endl; - - fout << " Reduced chi squared : " << redchisq << '\n' - << " Rw - value : " << fit_rw << '\n' << endl; - - fout << " Correlations greater than 0.8 :\n\n"; - - bool lkor = false; - - for (i = order.begin(); i != order.end(); ++i) - { - if (!ip[*i]) continue; - - vector::iterator j; - for (j = i + 1; j != order.end(); ++j) - { - if (!ip[*j]) continue; - - double corr = covar[*i][*j]/dp[*i]/dp[*j]; - - if (fabs(corr) > 0.8) - { - fout << " Corr(p[" << id[*i] << "], p[" << id[*j] << "]) = " << corr << endl; - lkor = true; - } - } - } - if (!lkor) - fout << " *** none ***\n"; - } -} - - -// Parameter indices in the vector id are not ordered by default. -// Return a proper order indices for id. This method is used -// for parameters printout. -vector Fit::order_by_id() const -{ - assert(this->psize() == int(this->id.size())); - typedef pair IdIndex; - vector id_with_idx; - for (size_t i = 0; i < id.size(); ++i) - { - id_with_idx.push_back(IdIndex(id[i], i)); - } - sort(id_with_idx.begin(), id_with_idx.end()); - // build return value - vector rv; - rv.reserve(id_with_idx.size()); - vector::iterator ii; - for (ii = id_with_idx.begin(); ii != id_with_idx.end(); ++ii) - { - rv.push_back(ii->second); - } - return rv; -} - - -// End of file diff --git a/src/extensions/libpdffit2/parser.cc b/src/extensions/libpdffit2/parser.cc deleted file mode 100644 index 46a5157c..00000000 --- a/src/extensions/libpdffit2/parser.cc +++ /dev/null @@ -1,402 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Formula parser implemented as methods of Fit class -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "pdffit.h" - -static vector vstack; -static vector > dstack; // stack with derivative vectors -static bool deriv; - -string stackvar(int i) -{ - ostringstream expr; - expr << '#' << i; - return(expr.str()); -} - -/***************************************************************************************** - Searches for all parameters in the expression and replace them by stack pointers - *****************************************************************************************/ -string Fit::substitute_pars(string &expr) -{ - int ipos=-1, bopen, bclose; - unsigned int i; - string idexpr; - - // search the expression for the next @-sign - while((bopen=expr.find('@',ipos+1)) != (int) string::npos) - { - int id; - - istringstream inexpr(expr); - inexpr.seekg(bopen+1); - - inexpr >> id; - - if (!inexpr) - throw parseError(expr); - - bclose = inexpr.tellg(); - - // expression must be a valid parameter id - int ipar = parfind(id); - - if (ipar == -1) - { - ostringstream msg; - msg << "parameter " << id << " undefined"; - throw constraintError(msg.str()); - } - - // check if same parameter already occurred in this formula - for (i=0; i dnumdp(used.size()); - for (i=0; i()); - } - } - - return expr; // okay -} - -// get next number from expression -// only fill derivatives if that number has derivatives -double Fit::getnum(istringstream &inexpr, vector &dnumdp) -{ - double num; - char c; - int id; - map::iterator iter; - - // Various possibilities when reading the next value inside the - // unbracketted expression - - if (deriv) dnumdp.clear(); - - inexpr >> c; - - if (inexpr.eof()) - throw parseError("Error while reading value"); - - // if first character is a minus sign, call getnum again with expression stripped - // from its minus sign - if ((c=='-') || (c=='+')) - { - num = getnum(inexpr, dnumdp); - if (deriv && !dnumdp.empty() && (c=='-')) - { - for (unsigned int i=0; i check for built-in function - // read-up to next # - else if ((c>='a') && (c<='z')) - { - int start=inexpr.tellg(); - start--; - string::size_type end; - end = inexpr.str().find('#', start); - if (end == string::npos) - { - throw parseError("Error while reading builtin function arguments"); - } - - string sbuiltin = inexpr.str().substr(start,end-start); - if ((iter=builtin.find(sbuiltin)) == builtin.end()) - { - throw parseError("Unknown builtin function"); - } - - // set read pointer behind #-sign - inexpr.seekg(end+1); - - // read argument number - inexpr >> id; - if (!inexpr) - throw parseError(inexpr.str()); - num = iter->second.func(vstack[id]); - - // fill the partial derivatives if function argument had derivatives - if (deriv && !dstack[id].empty()) - { - double fder=iter->second.deriv(vstack[id]); - dnumdp = vector(used.size()); - for(unsigned int i=0; i> id; - if (!inexpr) - throw parseError(inexpr.str()); - num = vstack[id]; - if (deriv && !dstack[id].empty()) dnumdp = dstack[id]; - } - else - { - inexpr.unget(); - inexpr >> num; - - if (!inexpr) - throw parseError("Error while reading value"); - } - return num; -} - -/********************************************** - computes a basic expression without brackets - ***********************************************/ -double Fit::compute(string &expr, vector &dnumdp) -{ - ostringstream ostreamexpr; - string opstring="*/+-"; - double num1, num2, num; - vector dnum1dp, dnum2dp; - char op; // operator - - // transform string to string stream to read numbers more easily - istringstream inexpr(expr); - - // Two parsing passes are performed to ensure correct precedence of - // operators: first for * and /, then for + and - - int pass = 1; - - while(1) - { - int pos, end; - - if (deriv) dnumdp.clear(); - - pos = inexpr.tellg(); - - num1 = getnum(inexpr, dnum1dp); - - inexpr >> op; - - // check if this ends the expression - // if pass==2: expression completely parsed - // if pass==1: go to pass 2 - if (inexpr.eof()) - { - if (pass==2) - { - num = num1; - if (deriv && !dnum1dp.empty()) - dnumdp = dnum1dp; - break; - } - else - { - pass = 2; - inexpr.clear(); - inexpr.str(expr); - continue; - } - } - - if (!inexpr) - throw parseError(expr); - - if (opstring.find(op) == string::npos) - throw parseError(expr); - - // if a + or - operation is encountered in pass 1 -> look for next operation - if ( (pass==1) && ((op == '+') || op == '-') ) - { - continue; - } - - num2 = getnum(inexpr,dnum2dp); - - if (!dnum1dp.empty() || !dnum2dp.empty()) - dnumdp = vector(used.size()); - - switch (op) - { - case '+': - num = num1+num2; - - if (deriv) - { - if (!dnum1dp.empty()) dnumdp = dnum1dp; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += dnum2dp[i]; - } - break; - - case '-': - num = num1-num2; - - if (deriv) - { - if (!dnum1dp.empty()) dnumdp = dnum1dp; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] -= dnum2dp[i]; - } - break; - - case '*': - num = num1*num2; - - if (deriv) - { - if (!dnum1dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += dnum1dp[i]*num2; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += num1*dnum2dp[i]; - } - break; - - case '/': - num = num1/num2; - - if (deriv) - { - if (!dnum1dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] += dnum1dp[i]/num2; - if (!dnum2dp.empty()) - for (unsigned int i=0; i< used.size(); i++) - dnumdp[i] -= num1*dnum2dp[i]/sqr(num2); - } - break; - } - - end = inexpr.tellg(); - - // replace computed substring by stack pointer, and push value on the stack - expr.replace(pos,end-pos,stackvar(vstack.size())); - vstack.push_back(num); - - // store the derivatives as well. Note that the derivative vector may be empty - // if no derivatives was non-zero. - if (deriv) - dstack.push_back(dnumdp); - - inexpr.clear(); - inexpr.str(expr); - inexpr.seekg(pos); - } - - // the expression has been reduced to just one number - return num; -} - -/*************************************************************************************** - Searches the formula for bracketted expressions replace them by their numerical values - ****************************************************************************************/ - -double Fit::parse(string line, vector &dnumdp) -{ - int bopen, bclose; - string expression; - double num; - - if (line.find('#') != string::npos) - throw parseError("Illegal character in formula"); - - // the first elements on the stack will be the used parameter values - vstack.clear(); - used.clear(); - - // Search for parameters, check their existence and put on the stack - line = substitute_pars(line); - - // look for first closing bracket - while( (bclose=line.find(')')) != (int) string::npos) - { - // look for closest opening bracket in front of closing bracket - if ( (bopen=line.rfind('(',bclose-1)) == (int) string::npos) - throw parseError("Unmatched brackets in formula"); - - // isolate expression within the brackets - expression = line.substr(bopen+1,bclose-bopen-1); - - // compute isolated expression - num = compute(expression, dnumdp); - - // put the bracket-value on the stack and replace substring by stack pointer, - // and push new value on the stack - line.replace(bopen,bclose-bopen+1,stackvar(vstack.size())); - vstack.push_back(num); - - if (deriv) - dstack.push_back(dnumdp); - - } - - // After all brackets have been worked out, the final expression is evaluated - num = compute(line, dnumdp); - - return num; // okay -} - -// End of file diff --git a/src/extensions/libpdffit2/pdf.cc b/src/extensions/libpdffit2/pdf.cc deleted file mode 100644 index 595fee96..00000000 --- a/src/extensions/libpdffit2/pdf.cc +++ /dev/null @@ -1,1776 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Mixed methods for PDF calculation from PdfFit, DataSet and Phase -* -* Comments: Up to date with 1.3.10 Fortran version. -* What a spaghetti. -* -***********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "PointsInSphere.h" -#include "StringUtils.h" -#include "LocalPeriodicTable.h" -#include "MathUtils.h" -#include "ShapeFactors.h" - -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -#define NEW_SHARP - -/***************************************************************** - Allocating space for dummy dataset when calculating PDF - without data -******************************************************************/ -void PdfFit::alloc(char tp, double qmax, double qdamp, double rmin, double rmax, int bin) -{ - - DataSet* pds = new DataSet(this); - int i; - if (rmax < rmin || rmin < 0 || rmax < 0) - { - throw ValueError("Check rmin, rmax"); - } - if (bin <= 1) - { - throw ValueError("bin must be > 1"); - } - if( qmax < 0.0 ) - { - throw ValueError("qmax must be >= 0"); - } - if( qdamp < 0 ) - { - throw ValueError("qdamp must be >= 0"); - } - - // 2009-03-11 PJ: Removed check if a structure has been loaded before. - // It can be now loaded after calling alloc. - - pds->iset = nset+1; - - pds->scattering_type = tp; - - pds->qmax = qmax; - pds->qdamp = qdamp; - pds->rmin = pds->rfmin = rmin; - pds->rmax = pds->rfmax = rmax; - pds->bin = bin; - pds->deltar = (rmax-rmin)/double(bin-1); - pds->name = "Dummy set"; - - pds->obs.resize(bin); - pds->wic.resize(bin); - - for (i=0; iobs[i] = 0.0; - pds->wic[i] = 1.0; - } - - *pout << " Allocated PDF data set " << pds->iset << " (r = " - << rmin << " to " << rmax << " A, " << bin << " points) ..." << endl; - - // automatically select existing phases and its atoms for the new dataset - for (int ip=0; ipselphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); -} - -// cut-away high Q harmonics using fast Fourier transformation -void DataSet::applyQmaxCutoff(double* y, size_t len) -{ - // pad y with the same number of zeros up to the next power of 2 - size_t padlen = 2*len; - // MS compatibility fix - padlen = (size_t) pow(2.0, ceil(log2(padlen))) ; - // ycpad is complex, so it needs to be twice as long - valarray ycpad_array(2*padlen); - double* ycpad = &(ycpad_array[0]); - fill_n(ycpad, 2*padlen, 0.0); - // copy y to real components of ycpad - for (size_t i = 0; i != len; ++i) ycpad[2*i] = y[i]; - // apply fft - int status; - status = gsl_fft_complex_radix2_forward(ycpad, 1, padlen); - if (status != GSL_SUCCESS) - { - throw calculationError("Fourier Transformation failed."); - } - // Q step for ycpad - double dQ = 2*M_PI/((padlen-1)*deltar); - // loQidx, hiQidx correspond to Qmax and -Qmax frequencies - // they need to be integer to catch cases with huge qmax/dQ - int loQidx = int( ceil(qmax/dQ) ); - int hiQidx = padlen + 1 - loQidx; - // zero high Q components in ycpad - for (int i = loQidx; i < hiQidx; ++i) - { - ycpad[2*i] = ycpad[2*i+1] = 0.0; - } - // transform back - status = gsl_fft_complex_radix2_inverse(ycpad, 1, padlen); - if (status != GSL_SUCCESS) - { - throw calculationError("Fourier Transformation failed."); - } - // copy real components - for (size_t i = 0; i != len; ++i) y[i] = ycpad[2*i]; -} - - -/***************************************************** - Calculate PDF for dataset with current structure - - In initial version: one phase -******************************************************/ - -void DataSet::determine(bool ldiff, bool lout, Fit &fit) -{ - //int kk, ibin, ip; - int ib, ie, ig; - double rmax2, rmin2, gaus, rk, rb,re, rtot, ract; - vector ppp; - double dd[3], d[3], dist2, dist, rg, r; - double sigmap, sigma, gnorm, ampl; - long totcalc=0; - - if (lout) *pout << " Calculating PDF ...\n"; - - // total # points to be fitted - nfmin = nint((rfmin-rmin)/deltar); - nfmax = nint((rfmax-rmin)/deltar); - - // extend calculation range before applying Qmax cutoff - extendCalculationRange(lout); - - rmax2 = sqr(rcmax+1.0); - rmin2 = sqr(rcmin-1.0) * ((rcmin-1.0) < 0.0 ? -1.0 : 1.0); - rmin2 = max(0.01,rmin2); - - pdftot.resize(ncmax+1); - fill(pdftot.begin(), pdftot.end(), 0.0); - calc.resize(ncmax+1,psel.size()); - ppp.resize(ncmax+1); - - if (ldiff) - { - fit_a.resize(ncmax+1, fit.varsize()); - fit_a = 0.0; - } - - // ------ Loop over all phases - - for (unsigned ip=0; ip ignore_i(phase.natoms); - valarray ignore_j(phase.natoms); - for (int aidx = 0; aidx < phase.natoms; ++aidx) - { - ignore_i[aidx] = phase_ignore_i[&phase].count(aidx); - ignore_j[aidx] = phase_ignore_j[&phase].count(aidx); - } - - // ------ Get the ratio total pairs/selected weight in structure - - rtot = 0.0; - ract = 0.0; - for (int iidx = 0; iidx < phase.natoms; ++iidx) - { - Atom& ai = phase.atom[iidx]; - for (int jidx = iidx; jidx < phase.natoms; ++jidx) - { - Atom& aj = phase.atom[jidx]; - double halfloopscale = (iidx == jidx) ? 1.0 : 2.0; - rtot += halfloopscale * ai.weight * aj.weight; - // skip ignored pair - bool skip = (ignore_i[iidx] || ignore_j[jidx]) && - (ignore_i[jidx] || ignore_j[iidx]); - if (skip) continue; - ract += halfloopscale * ai.weight * aj.weight; - } - } - phase.dnorm = ract/rtot; - - //-------------------------------------------------------------- - - fill(ppp.begin() + ncmin, ppp.begin() + ncmax + 1, 0.0); - - // calculate range for PointsInSphere sequencer - // (negative rsphmin is no problem) - double buffzone = phase.circum_diameter(); - double rsphmin = sqrt(rmin2) - buffzone; - double rsphmax = sqrt(rmax2) + buffzone; - // limit rsphmax, when stepcut has been set for the phase - if (phase.stepcut > 0.0) - { - rsphmax = min(rsphmax, phase.stepcut + buffzone); - } - PointsInSphere sph( rsphmin, rsphmax, phase.a0[0]*phase.icc[0], - phase.a0[1]*phase.icc[1], phase.a0[2]*phase.icc[2], - phase.win[0], phase.win[1], phase.win[2] ); - - // loop only over selected atom indexes - for (int iidx = 0; iidx < phase.natoms; ++iidx) - { - Atom& ai = phase.atom[iidx]; - for (int jidx = iidx; jidx < phase.natoms; ++jidx) - { - Atom& aj = phase.atom[jidx]; - - // skip ignored pair - bool skip = (ignore_i[iidx] || ignore_j[jidx]) && - (ignore_i[jidx] || ignore_j[iidx]); - if (skip) continue; - - for (sph.rewind(); !sph.finished(); sph.next()) - { - for (int i=0; i<3; i++) - { - dd[i] = ai.pos[i] - aj.pos[i] - - sph.mno[i]*phase.icc[i]; - d[i] = dd[i] * phase.a0[i]; - } - dist2 = phase.skalpro(dd,dd); - - // check if pair distance is within dataset r limits - if ((dist2 < rmin2) || (dist2 > rmax2)) continue; - - // dist is distance r_ij - dist = sqrt(dist2); - - //------ Setting up 'thermal' Gaussian - sigmap = sqrt(phase.msdAtoms(ai, aj, dd)); - // neglect unphysical summed square displacements - if (sigmap <= 0.0) continue; - - //- PDF peak width modifications - new 07/2003 - -#if defined(NEW_SHARP) - // Computation of peak sharpening sigma - // sigma = sigmap* sqrt(1 - delta2/r_ij^2 - delta1/r_ij + qbroad*r_ij^2) - double corfact; - corfact = 1 - phase.delta2/dist2 - - phase.delta1/dist + sqr(qbroad)*dist2; - - // if sigma negative: set it back to 1e-5 just for this point - // note: derivative will be incorrect in this case - if (corfact <= 0) - { - continue; // neglect contribution - } - else - { - sigma = sigmap * sqrt(corfact); - } -#else - // Computation of peak sharpening sigma - // sigma = sqrt(sqr(sigmap) - delta2/r_ij^2 - delta1/r_ij + qbroad*r_ij^2) - double sigma2; - sigma2 = sqr(sigmap) - phase.delta2/dist2 - - phase.delta1/dist + sqr(qbroad)*dist2; - - // if sigma2 negative: set it back to 1e-5 just for this point - // note: derivative will be incorrect in this case - if (sigma2 <= 1e-10) - { - sigma = 1e-5; // neglect contribution - } - else - { - sigma = sqrt(sigma2); - } -#endif - // apply rcut if requested - if (dist < phase.rcut) - { - sigma *= phase.sratio; - } - - // The gaus curve is computed up to distance of 5 sigma - gnorm = 1.0/(sqrt(2.0*M_PI)*sigma); - ampl = ai.occ * ai.weight * aj.occ * aj.weight; - - if (iidx != jidx) ampl += ampl; - - rb = max(rcmin, dist - 5.0*sigma); - re = min(rcmax, dist + 5.0*sigma); - if (phase.stepcut > 0.0) - { - re = min(re, phase.stepcut); - } - - ib = nint((rb-rmin)/deltar); - ie = nint((re-rmin)/deltar); - - for(ig=ib; ig<=ie; ig++) - { - totcalc++; - rk = rmin + ig*deltar; - rg = rk-dist; - gaus = gnorm * exp(-0.5*sqr(rg/sigma)); - ppp[ig] += ampl*gaus; - - // if derivative are needed - if (ldiff) - { - pdf_derivative(phase, ai, aj, rk, - sigma, sigmap, dist, d, ampl, gaus, - fit, fit_a[ig]); - } - } - } - } - } - - //------ - Convert to proper G(r) and add to total PDF - - for (int i = ncmin; i<=ncmax; i++) - { - r = i*deltar + rmin; - - calc[i][ip] = ppp[i]/phase.np/r - 4.0*M_PI*r*phase.rho0*phase.dnorm; - - // Q-resolution envelope - if (qdamp > 0.0) - { - calc[i][ip] *= exp(-sqr(r*qdamp)/2.0); - } - - // PDF envelope for spherical nano particles - if (phase.spdiameter > 0.0) - { - calc[i][ip] *= sphereEnvelope(r, phase.spdiameter); - } - - // Empirical shape step cutoff of the PDF - if (phase.stepcut > 0.0) - { - double stepfactor = (r <= phase.stepcut) ? 1.0 : 0.0; - calc[i][ip] *= stepfactor; - } - - //if ( (r <= phase.corr_max) || (phase.corr_max <= 0.0) ) - pdftot[i] += this->dscale * phase.pscale * calc[i][ip]; - } - } - - // finalize computation of derivatives if required - // this HAS to happen before the multiplication by deltar/pi and before - // the convolution to avoid "double operations" on the derivatives, - // as this will be taken care of in the derivatives. - if (ldiff) - { - fit_setup_derivatives(fit); // computes matrix dpdf/dvar - } - - //for (i=ncmin;i<=ncmax;i++) - // *pout << i << " " << pdftot[i] << endl; - - // From here on we can restrict ourselves to the range [nfmin,nfmax] - // for the outerloop - - // Apply Qmax cutoff - if (qmax > 0.0) - { - applyQmaxCutoff(&pdftot[ncmin], ncmax-ncmin+1); - } -} - -/***************************************************************** - This routine calculates the sums over 'ij' needed for the - derivatives - this is faster than doing the complete loop - in 'pdf_determine' again .. - gaus: gaus[igaus+kk] from -******************************************************************/ -void DataSet::pdf_derivative (Phase &phase, - const Atom& atomi, const Atom& atomj, double rk, double sigma, - double sigmap, double dist, double d[3], double ampl,double gaus, - Fit &fit, double* fit_a_i) -{ - double rd,dg; - rd = dg = 0.0; - double s11,s22,s33,s12,s13,s23; - double drdx, drda, phi, dsdphi, dspdx, dspda; - int ipar, i, ioffset, joffset; - - //------ Some common calculations - - s11 = atomi.u[0] + atomj.u[0]; - s22 = atomi.u[1] + atomj.u[1]; - s33 = atomi.u[2] + atomj.u[2]; - s12 = atomi.u[3] + atomj.u[3]; - s13 = atomi.u[4] + atomj.u[4]; - s23 = atomi.u[5] + atomj.u[5]; - - rd = (rk-dist)/sigma; - - if (dist < phase.rcut) - { - phi = phase.sratio; - dsdphi = sigma/phi; - } - else - { - phi = 1.0; - dsdphi = 0.0; - } - - // derivative of T_ij wrt sigma - double T = ampl*gaus; - double dTds = T/sigma*(rd*rd-1); - double dTdr = (rk-dist)/sqr(sigma)*T; - -#if defined(NEW_SHARP) - // define s2 = sp**2 - delta2/sqr(rij) - delta1/rij + alpha*sqr(rij) - // then s = phi*sqrt(s2) - double dsds2 = sqr(phi*sigmap)/(2.0*sigma); - double dsdsp = sigma/sigmap; - double dsdr = dsds2*(2.0*phase.delta2/cube(dist) - + phase.delta1/sqr(dist) + 2.0*sqr(qbroad)*dist); -#else - // define s2 = sp**2 - delta2/sqr(rij) - delta1/rij + alpha*sqr(rij) - // then s = phi*sqrt(s2) - double dsds2 = sqr(phi)/(2.0*sigma); - if (sigma==1e-5) dsds2 = 0; - - double dsdsp = 2.0*sigmap*dsds2; - double dsdr = dsds2*(2.0*phase.delta2/cube(dist) - + phase.delta1/sqr(dist) + 2.0*sqr(qbroad)*dist); -#endif - double dspdr = - sigmap/dist; - - - - /*---------------------------------------------------------------- - //------ Derivatives per atom : x,y,z,u,o - //- ------------------------------------------------------------- - - dTdx = dTds.(dsdsp.(dspdr.drdx+dspdx) + dsdr.drdx) + dTdr.drdx - */ - - ioffset = atomi.offset; - joffset = atomj.offset; - - // ----- d/dx[ip,ia] - - if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) - { - drdx = phase.a0[0]/dist*(d[0] + phase.cosg*d[1] + phase.cosb*d[2]); - dspdx = phase.a0[0]*(d[0]*s11 + d[1]*s12 + d[2]*s13)/sqr(dist)/sigmap; - - dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; - } - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] -= dg; - } - - - // ----- d/dy[ip,ia] - - if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) - { - drdx = phase.a0[1]/dist*(phase.cosg*d[0] + d[1] + phase.cosa*d[2]); - dspdx = phase.a0[1]*(d[0]*s12 + d[1]*s22 + d[2]*s23)/sqr(dist)/sigmap; - - dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; - } - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] -= dg; - } - - - // ----- d/dz[ip,ia] - - if ( (fit.refvar[ioffset] != -1) || (fit.refvar[joffset] != -1) ) - { - drdx = phase.a0[2]/dist*(phase.cosb*d[0] + phase.cosa*d[1] + d[2]); - dspdx = phase.a0[2]*(d[0]*s13 + d[1]*s23 + d[2]*s33)/sqr(dist)/sigmap; - - dg = dTds*(dsdsp*(dspdr*drdx+dspdx) + dsdr*drdx) + dTdr*drdx; - } - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] -= dg; - } - - - // ----- d/du[j,ip,ia] (j=11,22,33,12,13,23) - - /* - dTdu = dTds.dsdsp.dspdu - */ - - // u[0], u[1], u[2] - - double dspdu = 1/(2.0*sigmap*sqr(dist)); - - double fsimp = dTds*dsdsp*dspdu; - - for (i=0; i<3; i++) - { - dg = fsimp*sqr(d[i]); - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - //*pout << phase.a0[i] << " " << d[i] << " " << ig << " " << i << " " << fit_a_i[ipar] << endl; - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - } - - // u[3] - - dg = 2.0*fsimp*d[0]*d[1]; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - // u[4] - - dg = 2.0*fsimp*d[0]*d[2]; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - // u[5] - - dg = 2.0*fsimp*d[1]*d[2]; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += dg; - } - - - // ----- d/d occ[ip,ia], d/d occ[ip,ja] - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - fit_a_i[ipar] += T/atomi.occ; - } - - if ( (ipar=fit.refvar[joffset++]) != -1) - { - fit_a_i[ipar] += T/atomj.occ; - } - - //------ ---------------------------------------------------------------- - //------ Derivatives per phase : lat,delta2,delta1 - //------ ---------------------------------------------------------------- - - // ----- d/d(lattice parameter a) - - ioffset = phase.offset; - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = (d[0] + phase.cosg*d[1] + phase.cosb*d[2])*d[0]/phase.a0[0]/dist; - dspda = (d[0]*s11 + d[1]*s12 + d[2]*s13)*d[0]/phase.a0[0]/sqr(dist)/sigmap; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice parameter b) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = (phase.cosg*d[0] + d[1] + phase.cosa*d[2])*d[1]/phase.a0[1]/dist; - dspda = (d[0]*s12 + d[1]*s22 + d[2]*s23)*d[1]/phase.a0[1]/sqr(dist)/sigmap; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice parameter c) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = (phase.cosb*d[0] + phase.cosa*d[1] + d[2])*d[2]/phase.a0[2]/dist; - dspda = (d[0]*s13 + d[1]*s23 + d[2]*s33)*d[2]/phase.a0[2]/sqr(dist)/sigmap; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda + dTds*dsdsp*dspda; - - fit_a_i[ipar] += dg; - } - - - // ----- d/d(lattice angle alpha) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = - rad*phase.sina*d[1]*d[2]/dist; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice angle beta) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = - rad*phase.sinb*d[0]*d[2]/dist; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; - - fit_a_i[ipar] += dg; - } - - // ----- d/d(lattice angle gamma) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - drda = - rad*phase.sing*d[0]*d[1]/dist; - - dg = (dTds*(dsdsp*dspdr+dsdr) + dTdr)*drda; - - fit_a_i[ipar] += dg; - } - - // Derivatives wrt the peak sharpening parameters - - // ----- d/d(delta2) - - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = -dTds*dsds2/sqr(dist); - fit_a_i[ipar] += dg; - } - - // ----- d/d(delta1) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = -dTds*dsds2/dist; - fit_a_i[ipar] += dg; - } - - // ----- d/d(pscale) - - ioffset++; - - // ----- d/d(spdiameter) - - ioffset++; - - // ----- d/d(sratio) - - if ( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = dTds*dsdphi; - fit_a_i[ipar] += dg; - } - - - //------ ---------------------------------------------------------------- - //------ Derivatives per data set : dscale, qdamp, qbroad - //------ ---------------------------------------------------------------- - - ioffset = this->offset; - - // ----- d/d(dscale[is]) - - ioffset++; - - // ----- d/d(qdamp[is]) - - ioffset++; - - // ----- d/d(qbroad[ip]) - - if( (ipar=fit.refvar[ioffset++]) != -1) - { - dg = dTds*dsds2*(2.0*qbroad*sqr(dist)); - fit_a_i[ipar] += dg; - } - -} - - -/**************************************************************** -* Calculated average atom mass in this phase -*****************************************************************/ -double Phase::averageAtomicMass() -{ - double mavg = 0.0; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - mavg += ai->occ * ai->atom_type->M; - } - mavg /= np; - return mavg; -} - -/**************************************************************** -* Calculated average scattering factor for given radiation type -*****************************************************************/ -double Phase::averageScatteringFactor(char tp) -{ - double bavg = 0.0; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - bavg += ai->occ * ai->atom_type->sf(tp); - } - bavg /= np; - return bavg; -} - -/**************************************************************** -* Update atom weights for given scattering type -*****************************************************************/ -void Phase::setup_weights(char tp) -{ - // calculate average scattering factor - double bavg = averageScatteringFactor(tp); - // get normalized weight of each atom - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - ai->weight = ai->atom_type->sf(tp) / bavg; - } -} - -/************************************************************************ -* Extend r-range by 6 ripples of sinc before applying Qmax cutoff. -* Contributions from peaks outside should be less than 1.5%. -* -* todo: should also extend by the 5*max(sigma) -************************************************************************/ -void DataSet::extendCalculationRange(bool lout) -{ - const int nripples = 6; - // initialize calculation range to fitting range - rcmin = rfmin; - rcmax = rfmax; - ncmin = nint((rcmin - rmin)/deltar); - ncmax = nint((rcmax - rmin)/deltar); - // check if Qmax cutoff is applied - if (!(0.0 < qmax)) return; - // get extension width - double rext = nripples*2*M_PI/qmax; - // FIXME - it should be possible to have rcmin smaller than rmin, - // but there is too much spaghetti that depends on it. - rcmin = max(rmin, rfmin - rext); - rcmax = rfmax + rext; - ncmin = nint((rcmin - rmin)/deltar); - ncmax = nint((rcmax - rmin)/deltar); - if (lout) - { - *pout << " Extending PDF search distance to " << - rcmin << " -> " << rcmax << " A ...\n"; - } -} - -/************************************************************************ - * Diameter of sphere that can enclose primitive cell. - * This is equal to the longest unit cell diagonal. - ************************************************************************/ -double Phase::circum_diameter() -{ - if (atom.empty()) return 0.0; - // array of all 4 diagonals - const size_t numdiags = 4; - static double ucdiagonals[numdiags][3] = { - {+1.0, +1.0, +1.0}, - {-1.0, +1.0, +1.0}, - {+1.0, -1.0, +1.0}, - {+1.0, +1.0, -1.0} - }; - double maxnorm = -1; - for (size_t idx = 0; idx != numdiags; ++idx) - { - const double* ucd = ucdiagonals[idx]; - double normucd = sqrt(skalpro(ucd, ucd)); - if (normucd > maxnorm) - { - maxnorm = normucd; - } - } - // adjust to round-off errors - const double epsilond = sqrt(numeric_limits().epsilon()); - maxnorm = maxnorm*(1.0+epsilond) + epsilond; - return maxnorm; -} - -/************************************************************************ - * combined mean square displacements of 2 atoms along lattice vector - ************************************************************************/ -double Phase::msdAtoms(const Atom& ai, const Atom& aj, double* vl) -{ - // msd = transpose(gten*vln) * ar[i]*U[i,j]*ar[j] * gten*vln - // normalize vl - double vlnorm = sqrt(skalpro(vl,vl)); - double vln[3] = { vl[0]/vlnorm, vl[1]/vlnorm, vl[2]/vlnorm }; - // combine squared atom displacements - double U[6]; - for (size_t i = 0; i != 6; ++i) - { - U[i] = ai.u[i] + aj.u[i]; - } - // Un = ar[i]*U[i,j]*ar[j] - double Un[6] = { U[0]*ar[0]*ar[0], U[1]*ar[1]*ar[1], U[2]*ar[2]*ar[2], - U[3]*ar[0]*ar[1], U[4]*ar[0]*ar[2], U[5]*ar[1]*ar[2] }; - // rhs = gten*vln - double rhs[3] = { 0.0, 0.0, 0.0 }; - for (size_t i = 0; i != 3; ++i) - { - for (size_t j = 0; j != 3; ++j) - { - rhs[i] += gten[i][j] * vln[j]; - } - } - // msd = transpose(rhs) * Un * rhs - double msd; - msd = Un[0]*rhs[0]*rhs[0] + Un[1]*rhs[1]*rhs[1] + Un[2]*rhs[2]*rhs[2] + - 2*Un[3]*rhs[0]*rhs[1] + 2*Un[4]*rhs[0]*rhs[2] + 2*Un[5]*rhs[1]*rhs[2]; - return msd; -} - -/********************************* ------- - Save fit results - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file is - optional. -*********************************/ -string PdfFit::save_res(string fname) -{ - //check to see if a refinement has even been done. - //after a refinement is finished, fit.iter = -1 - if(fit.iter == 0) - { - throw unassignedError("Refinement must be performed first"); - } - ofstream fout; - stringstream outfilestream; - string outfilestring = ""; - - outfilestream << " " << string(78,'=') << endl - << " PDF REFINEMENT\n" - << " Using PDFFIT version : " << PdfFit::version() << endl - << " " << string(78,'=') << endl; - - for(int ip=0; ipoutput(outfilestream); - - fit.output(outfilestream); - - outfilestream << " " << string(78,'=') << endl; - - if( fname != "" ) - { - fout.open(fname.c_str()); - - if (!fout) - { - throw IOError("Cannot create output file"); - } - - *pout << " Saving fit results to file : " << fname << endl; - - fout << outfilestream.str(); - //fout.setf(ios::showpoint); - - fout.close(); - } - - return outfilestream.str(); -} - -/************************************************* - ------- Save PDF, structure or complete result - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file is - optional. -**************************************************/ -string PdfFit::save_pdf(int iset, string fname) -{ - string outfilestring = ""; - - //------ - Save PDF (G(r)) - - if ( (iset < 1) || (iset > nset) ) - { - throw unassignedError("data set does not exist"); - } - else if( fname != "" ) - { - ofstream fout; - fout.open(fname.c_str()); - - if (!fout) - { - throw IOError("cannot create output file"); - } - - *pout << " Saving PDF data set " << iset << " to file : " << fname << endl; - - outfilestring = datasets[iset-1]->build_pdf_file(); - - fout << outfilestring; - fout.close(); - } - else - { - outfilestring = datasets[iset-1]->build_pdf_file(); - } - - return outfilestring; -} - - -/* - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. -*/ -string DataSet::build_pdf_file() -{ - string blank=string(4,' '); - stringstream outfilestream; - outfilestream.setf(ios::showpoint); - - for (int i=nfmin;i<=nfmax;i++) - { - double r = i*deltar + rmin; - outfilestream << setw(12) << r << blank << setw(12) << pdftot[i] << blank << setw(12) << 0.0 - << blank << setw(12) << 1.0/sqrt(wic[i]) << blank << setw(12) - << obs[i]-pdftot[i] << endl; - } - - return outfilestream.str(); -} - -//------ - Save DIF file (Gobs-G(r)) -/* - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file - is optional. -*/ - -string PdfFit::save_dif(int iset, string fname) -{ - - ofstream fout; - string outfilestring = ""; - - if ( (iset < 1) || (iset > nset) ) - { - throw unassignedError("Data set does not exist"); - } - else if (fname != "" ) - { - fout.open(fname.c_str()); - - if (!fout) - { - throw IOError("Cannot create output file"); - } - - *pout << " Saving difference data set " << iset << " to file : " << fname << endl; - - outfilestring = datasets[iset-1]->build_dif_file(); - - fout << outfilestring; - fout.close(); - } - else - { - outfilestring = datasets[iset-1]->build_dif_file(); - } - - return outfilestring; -} - -/* - Thu Oct 13 2005 - CLF - Changed code to return a string of the saved file. -*/ -string DataSet::build_dif_file() -{ - string blank=string(4,' '); - stringstream outfilestream; - outfilestream.setf(ios::showpoint); - - for (int i=nfmin;i<=nfmax;i++) - { - double r = i*deltar + rmin; - outfilestream << setw(12) << r << blank << setw(12) << obs[i]-pdftot[i] << endl; - } - - return outfilestream.str(); -} - -void PdfFit::selphase(int ip) -{ - if (!curset) - { - throw unassignedError("No data set selected"); - } - assert(nphase == (int)phase.size()); - if (ip == ALL) - { - curset->psel = phase; - } - else - { - // check if one-based index ip is out of bounds - if (ip < 1 || ip > nphase) - { - stringstream eout; - eout << "Phase " << ip << " undefined"; - throw unassignedError(eout.str()); - } - curset->selphase(ip - 1, phase[ip - 1]); - } -} - -void DataSet::selphase(int ip, Phase *phase) -{ - if (int(psel.size()) <= ip) - { - psel.resize(ip+1); - } - psel[ip] = phase; -} - - -vector DataSet::getcrw() const -{ - assert(mowner); - double wsqobs = mowner->totalWeighedSquareObs(); - // Get reciprocal value of wsqobs. - // Do not normalize when wsqobs is zero. - double recwsqobs = (wsqobs > 0) ? (1.0 / wsqobs) : 1.0; - vector rv = this->cumchisq; - vector::iterator xi; - for (xi = rv.begin(); xi != rv.end(); ++xi) - { - *xi = sqrt(*xi * recwsqobs); - } - return rv; -} - - -double DataSet::weighedSquareObs() const -{ - double rv = 0; - for (int i = nfmin; i <= nfmax; i++) - { - rv += wic[i] * obs[i] * obs[i]; - } - return rv; -} - - -double DataSet::getdsrw() const -{ - vector crw = this->getcrw(); - double rv = crw.empty() ? 0.0 : crw.back(); - return rv; -} - - -double DataSet::getdsredchisq() const -{ - assert(mowner); - int nredobs = mowner->totalReducedObservations(); - double c2 = this->cumchisq.empty() ? 0.0 : this->cumchisq.back(); - double rv = (nredobs > 0) ? (c2 / nredobs) : 0.0; - return rv; -} - - -void PdfFit::pdesel(int ip) -{ - if (!curset) - { - throw unassignedError("No data set selected"); - } - assert(nphase == (int)curset->psel.size()); - if (ip == ALL) - { - fill(curset->psel.begin(), curset->psel.end(), - static_cast(NULL)); - } - else - { - // check if one-based index ip is out of bounds - if (ip < 1 || ip > nphase) - { - stringstream eout; - eout << "phase " << ip << " undefined"; - throw unassignedError(eout.str()); - } - curset->psel[ip - 1] = NULL; - } -} - -// phase[ip-1] or curphase for ip == 0 -Phase* PdfFit::getphase(int ip) -{ - Phase* ph = (0 < ip && ip <= nphase) ? phase[ip-1] : curphase; - if (!ph || ip < 0 || ip > nphase) - { - throw unassignedError("Phase does not exist."); - } - return ph; -} - -void PdfFit::check_sel_args(int ip, char ijchar, int aidx1) -{ - ostringstream emsg; - if (!curset) - { - throw unassignedError("No data set selected"); - } - if (ip < 1 || ip > int(curset->psel.size())) - { - emsg << "phase " << ip << " undefined or not selected\n"; - throw unassignedError(emsg.str()); - } - if (ijchar != 'i' && ijchar != 'j') - { - ostringstream emsg; - emsg << "Invalid value of ijchar '" << ijchar << "'"; - throw ValueError(emsg.str()); - } - if (aidx1 < 1 || aidx1 > (curset->psel[ip - 1]->natoms)) - { - emsg << "invalid atom index " << aidx1 << ".\n"; - throw ValueError(emsg.str()); - } -} - -void PdfFit::selphaseForEachDataSet(Phase* ph) -{ - // find 0-based index of ph in PdfFit::phase vector - assert(count(this->phase.begin(), this->phase.end(), ph) > 0); - int phidx0 = find(this->phase.begin(), this->phase.end(), ph) - - this->phase.begin(); - vector::iterator dsi; - for (dsi = this->datasets.begin(); dsi != this->datasets.end(); ++dsi) - { - DataSet* pds = *dsi; - pds->selphase(phidx0, ph); - } -} - -void PdfFit::selectAtomType(int ip, char ijchar, char* symbol, bool select) -{ - check_sel_args(ip, ijchar); - Phase* ph = curset->psel[ip - 1]; - const LocalPeriodicTable* lpt = ph->getPeriodicTable(); - const AtomType* atp = lpt->lookup(symbol); - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - for (int aidx = 0; aidx < ph->natoms; ++aidx) - { - if (atp != ph->atom[aidx].atom_type) continue; - if (select) ignored.erase(aidx); - else ignored.insert(aidx); - } -} - -void PdfFit::selectAtomIndex(int ip, char ijchar, int aidx1, bool select) -{ - check_sel_args(ip, ijchar, aidx1); - Phase* ph = curset->psel[ip - 1]; - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - int aidx = aidx1 - 1; - if (select) ignored.erase(aidx); - else ignored.insert(aidx); -} - -void PdfFit::selectAll(int ip, char ijchar) -{ - check_sel_args(ip, ijchar); - Phase* ph = curset->psel[ip - 1]; - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - ignored.clear(); -} - -void PdfFit::selectNone(int ip, char ijchar) -{ - check_sel_args(ip, ijchar); - Phase* ph = curset->psel[ip - 1]; - set& ignored = ijchar == 'i' ? - curset->phase_ignore_i[ph] : curset->phase_ignore_j[ph]; - for (int aidx = 0; aidx < ph->natoms; ++aidx) ignored.insert(aidx); -} - -/***************************************** - Wed Oct 12 2005 - CLF - Reads observed PDF from arrays. -******************************************/ -int PdfFit::read_data_arrays(char tp, double qmax, double qdamp, - int length, double * r_data, double * Gr_data, double * dGr_data, string _name) -{ - DataSet* pds = new DataSet(this); - - try { - pds->read_data_arrays(nset+1, tp, qmax, qdamp, length, - r_data, Gr_data, dGr_data, _name); - } - catch(Exception e) { - delete pds; - throw; - } - - // automatically select existing phases and its atoms for the new dataset - for (int ip=0; ipselphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); - - return 1; -} - -/***************************************** - Wed Oct 12 2005 - CLF - Reads observed PDF from a c-style string. -******************************************/ - -int PdfFit::read_data_string(string& buffer, char tp, double qmax, double qdamp, string _name) -{ - DataSet* pds = new DataSet(this); - try { - pds->read_data_string(nset+1, buffer, tp, qmax, qdamp); - } - catch(Exception e) { - delete pds; - throw; - } - // automatically select existing phases and its atoms for the new dataset - for (int ip = 0; ip < nphase; ip++) pds->selphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); - - return 1; -} - -/***************************************** - Reads observed PDF as xy ASCII file. -******************************************/ - -int PdfFit::read_data(string datafile, char tp, double qmax, double qdamp) -{ - DataSet* pds = new DataSet(this); - try { - pds->read_data(nset+1, datafile, tp, qmax, qdamp); - } - catch(Exception e) { - delete pds; - throw; - } - - // automatically select existing phases and its atoms for the new dataset - for (int ip=0; ipselphase(ip, this->phase[ip]); - - this->datasets.push_back(pds); - nset++; - setdata(nset); - - return 1; -} - -// local helper to check for regular spacing in sequence -namespace { - -template -bool isRegular(Iterator first, Iterator last) -{ - if (last - first < 2) return true; - double dx = double( *(last-1) - *first ) / double(last - first - 1); - for (Iterator p0 = first, p1 = first + 1; p1 != last; ++p0, ++p1) - { - if (fabs(*p1 - *p0 - dx) > deltar_tol) return false; - } - return true; -} - -} // local namespace - - -/* Wed Oct 12 2005 - CLF - * Using read_data_arrays adds functionality - * to pdffit2, allowing one to read data that is already stored as arrays. - */ -void DataSet::read_data_arrays(int _iset, char tp, double _qmax, double _qdamp, - int length, double * r_data, double * Gr_data, - double * dGr_data, string _name ) -{ - iset = _iset; - - //------ Now analyse given parameters - - //------ - get exp. method (neutron/x-ray) - - scattering_type = tp; - - //------ - get QMAX and Qdamp - - qmax = _qmax; - qdamp = _qdamp; - - //------ Finally we actually read the data - - bool lwei = true; - - /* Only really care about G(r) and dG(r), the uncertainty */ - for( int i = 0; i < length; i++ ) - { - double wic; - - if( dGr_data == NULL ) - { - wic = 1.0; - lwei = false; - } - else - { - wic = 1.0/sqrt( dGr_data[i] ); - } - - this->obs.push_back( Gr_data[i] ); - this->wic.push_back(wic); - - } - - *pout << " Reading data from arrays...\n"; - - rmin = rfmin = r_data[0]; - rmax = rfmax = r_data[length - 1]; - bin = length; - deltar = (rmax - rmin)/double(bin-1); - // check if r has equidistant spacing - if (!isRegular(r_data, r_data + length)) - { - throw dataError("Irregular spacing of r values."); - } - name = _name; - - *pout << " Read PDF data set " << iset << - " (r = " << rmin << " to " << rmax << " A, " << - bin << " points) ...\n"; - if (!lwei) this->warningOnMissingWeights(); - *pout << endl; - - return; -} - -void DataSet::read_data_stream(int _iset, istream& fdata, - char tp, double _qmax, double _qdamp, string _name) -{ - string line; - - iset = _iset; - - //------ - get exp. method (neutron/x-ray) - - scattering_type = tp; - - //------ - get QMAX and Qdamp - - qmax = _qmax; - qdamp = _qdamp; - - //------ Ignore header lines - getline(fdata, line); - if (line.compare(0, 7, "History") == 0) - { - for ( ; !fdata.eof(); getline(fdata,line)) - { - if (line[0] != '#') continue; - // get 3 words from line - string w0, w1, w2; - istringstream fline(line); - fline >> w0 >> w1 >> w2; - if ( w0.find_first_not_of('#') == string::npos && - w1 == "start" && w2 == "data" ) break; - } - } - //------ Any other header lines starting with # ? - while (line[0] == '#') getline(fdata,line); - - //------ Finally we actually read the data - - // find number of columns - int ncol = 0; - if (!line.empty()) - { - double x; - istringstream sline(line); - while (sline >> x) ++ncol; - } - - vector r_data; - bool lwei = (ncol > 2); // flag for weights defined by dGr - - while (true) - { - double ri, obs; - double val, wic; - istringstream sline(line); - - sline >> ri >> obs; - if (!sline) break; - - // Obtain weights from dGr. Use dGr values only when they are all - // positive, otherwise set all weights to 1. - wic = 1.0; - switch (ncol) - { - case 3: - if (sline >> val && val > 0.0) - { - wic = 1.0/sqr(val); - } - else - { - lwei = false; - } - break; - case 4: - // skip one value - if (sline >> val >> val && val > 0.0) - { - wic = 1.0/sqr(val); - } - else - { - lwei = false; - } - break; - } - - // copy values to data arrays - r_data.push_back(ri); - this->obs.push_back(obs); - this->wic.push_back(wic); - - if (!getline(fdata, line)) break; - } - - // make sure all wic values are one when lwei is false, because - // lwei could be reset due to zero dGr value - if (!lwei) - { - fill(this->wic.begin(), this->wic.end(), 1.0); - } - - *pout << " Reading " << ncol << " columns ...\n"; - - if (!isRegular(r_data.begin(), r_data.end())) - { - throw dataError("Irregular spacing of r values."); - } - if (this->obs.size() < 2) - { - throw dataError("Incredibly short data set."); - } - bin = this->obs.size(); - this->rmin = this->rfmin = r_data.front(); - this->rmax = this->rfmax = r_data.back(); - this->nfmin = 0; - this->nfmax = bin - 1; - this->deltar = (rmax - rmin)/double(bin-1); - this->name = _name; - - *pout << " Read PDF data set " << iset << " (r = " << rmin - << " to " << rmax << " A, " << bin << " points) ...\n"; - - if (!lwei) this->warningOnMissingWeights(); - - *pout << endl; - - return; -} - -/* Wed Oct 12 2005 - CLF - * Using read_data_string adds functionality - * to pdffit2, allowing one to read data that has already been loaded. - * - * - * Thu Nov 3 2005 - CLF - * Need to add some data checking routines! - */ -void DataSet::read_data_string(int _iset, string& buffer, char tp, double _qmax, - double _qdamp, string _name) -{ - istringstream fdata(buffer); - read_data_stream(_iset, fdata, tp, _qmax, _qdamp, _name); - return; -} - -/* Wed Oct 12 2005 - CLF - * Using read_data and the above read_data_string adds functionality - * to pdffit2, allowing one to read data that has already been loaded. - */ -void DataSet::read_data(int _iset, string pfile, char tp, double _qmax, - double _qdamp) -{ - // open and check pfile - ifstream fdata(pfile.c_str()); - if (!fdata) throw IOError("File does not exist"); - // read the data - read_data_stream(_iset, fdata, tp, _qmax, _qdamp, pfile); - return; -} - -/********************************* - Sets R-range for fitting -**********************************/ -void PdfFit::range(int is, double rmin, double rmax) -{ - if( rmin >= rmax ) - { - throw ValueError("rmin must be < rmax"); - } - if (is == ALL) - { - for(is = 0; is < nset; is++) datasets[is]->range(rmin,rmax); - } - else - { - if ( (is >= 1) && (is <= nset) ) - { - datasets[is-1]->range(rmin,rmax); - } - else - { - throw ValueError("Invalid data set number"); - } - } -} - -void DataSet::range(double rmin, double rmax) -{ - if ( (rmin >= this->rmin) && (rmin <= this->rmax) - && (rmax <= this->rmax) && (rmin < rmax) ) - { - this->rfmin = rmin; - this->rfmax = rmax; - } - else - { - throw ValueError("Range outside data set limits"); - } -} - -vector< pair > DataSet::getAtomPhaseFractions() -{ - size_t nphase = psel.size(); - valarray xi(nphase); - valarray dxi(nphase); - for (size_t ip = 0; ip < nphase; ip++) - { - Phase* ph = psel[ip]; - if (!ph) - { - xi[ip] = 0.0; - dxi[ip] = 0.0; - } - else - { - double bavg = ph->averageScatteringFactor(scattering_type); - xi[ip] = ph->pscale / (bavg*bavg); - dxi[ip] = ph->dpscale / (bavg*bavg); - } - } - double xtot = xi.sum(); - vector< pair > rv(nphase, make_pair(0.0, 0.0)); - double dx2tot = (dxi * dxi).sum(); - // get normalized phase fractions fi, do this only when xtot > 0 - for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) - { - double fi = xi[ip] / xtot; - double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + - xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); - double dfi = sqrt(dfi2); - rv[ip].first = fi; - rv[ip].second = dfi; - } - return rv; -} - -vector< pair > DataSet::getCellPhaseFractions() -{ - size_t nphase = psel.size(); - valarray xi(nphase); - valarray dxi(nphase); - for (size_t ip = 0; ip < nphase; ip++) - { - Phase* ph = psel[ip]; - if (!ph) - { - xi[ip] = 0.0; - dxi[ip] = 0.0; - } - else - { - double bavg = ph->averageScatteringFactor(scattering_type); - xi[ip] = ph->pscale / (bavg*bavg * ph->np); - dxi[ip] = ph->dpscale / (bavg*bavg * ph->np); - } - } - double xtot = xi.sum(); - vector< pair > rv(nphase, make_pair(0.0, 0.0)); - double dx2tot = (dxi * dxi).sum(); - // get normalized phase fractions fi, do this only when xtot > 0 - for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) - { - double fi = xi[ip] / xtot; - double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + - xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); - double dfi = sqrt(dfi2); - rv[ip].first = fi; - rv[ip].second = dfi; - } - return rv; -} - -vector< pair > DataSet::getMassPhaseFractions() -{ - size_t nphase = psel.size(); - valarray xi(nphase); - valarray dxi(nphase); - for (size_t ip = 0; ip < nphase; ip++) - { - Phase* ph = psel[ip]; - if (!ph) - { - xi[ip] = 0.0; - dxi[ip] = 0.0; - } - else - { - double bavg = ph->averageScatteringFactor(scattering_type); - double mavg = ph->averageAtomicMass(); - xi[ip] = ph->pscale * mavg / (bavg*bavg); - dxi[ip] = ph->dpscale * mavg / (bavg*bavg); - } - } - double xtot = xi.sum(); - vector< pair > rv(nphase, make_pair(0.0, 0.0)); - double dx2tot = (dxi * dxi).sum(); - // get normalized phase fractions fi, do this only when xtot > 0 - for (size_t ip = 0; ip < nphase && 0.0 < xtot; ip++) - { - double fi = xi[ip] / xtot; - double dfi2 = ( dxi[ip]*dxi[ip] * (xtot*xtot - 2*xtot*xi[ip]) + - xi[ip]*xi[ip]*dx2tot ) / pow(xtot, 4); - double dfi = sqrt(dfi2); - rv[ip].first = fi; - rv[ip].second = dfi; - } - return rv; -} - - -void DataSet::warningOnMissingWeights() const -{ - *pout << - " ****WARN****\n" << - " Uncertainties on G(r) were absent or unreadable in your input\n" << - " data. The program reset these uncertainties to unity. This\n" << - " does not affect at all the refined parameter values. However,\n" << - " the values of the estimated uncertainties on these refined\n" << - " parameter values are not reliable.\n" << - " ****WARN****\n"; -} - -// End of file diff --git a/src/extensions/libpdffit2/pdffit.cc b/src/extensions/libpdffit2/pdffit.cc deleted file mode 100644 index 7eaa5f49..00000000 --- a/src/extensions/libpdffit2/pdffit.cc +++ /dev/null @@ -1,372 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch, Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PdfFit and Fit methods for implementing PDFFIT1 interpreter commands. -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "pdffit.h" - - -// class methods - -const string& PdfFit::version(const char* ver) -{ - static unique_ptr vervalue; - static const string undefined_version = "1.0?"; - // definition of the version value. This should be only called once, - // when the pdffit2 module is initialized. We allow redefinition - // with the same version as this may happen when pdffit2 gets reloaded. - if (ver) - { - if (!vervalue.get()) - { - vervalue.reset(new string(ver)); - } - else if (*vervalue != ver) - { - ostringstream emsg; - emsg << "Invalid redefinition of PdfFit::version."; - throw invalid_argument(emsg.str()); - } - } - // take care of return value rv. - const string& rv = vervalue.get() ? *vervalue : undefined_version; - return rv; -} - - -// constructor and destructor - - -PdfFit::PdfFit() -{ - reset(); - init(); -} - - -PdfFit::~PdfFit() -{ - reset(); -} - - -/********************************************************** - resets the data sets and crystal structures to empty -***********************************************************/ - -void PdfFit::reset() -{ - //------ Data sets - - vector::iterator dsi = this->datasets.begin(); - for (; dsi != this->datasets.end(); ++dsi) delete *dsi; - this->datasets.clear(); - this->nset = 0; - this->curset = NULL; - - //------ Structure - - vector::iterator phi = this->phase.begin(); - for (; phi != this->phase.end(); ++phi) delete *phi; - this->phase.clear(); - this->nphase = 0; - this->curphase = NULL; - this->total = 0; - - // ------ Fit - - this->fit.reset(); -} - -void Fit::reset() -{ - // reset all data members to initial values - alambda = chisq = ochisq = fit_rw = redchisq = wnorm = 1.0; - stagnating = ntot = ndof = 1; - iter = 0; - // clean all arrays - p.clear(); - dp.clear(); - id.clear(); - ip.clear(); - covar.clear(); - alpha.clear(); - var.clear(); - dvar.clear(); - vref.clear(); - vcovar.clear(); - fconstraint.clear(); - form.clear(); - idef.clear(); - ctype.clear(); - used.clear(); - dvdp.clear(); - sdptr.clear(); - refvar.clear(); -} - - -void Fit::init_builtins() -{ - typedef pair entry; - builtin.insert(entry("-",Builtin(neg,dneg))); - builtin.insert(entry("sin",Builtin(sin,dsin))); - builtin.insert(entry("cos",Builtin(cos,dcos))); - builtin.insert(entry("tan",Builtin(tan,dtan))); - builtin.insert(entry("sind",Builtin(sind,dsind))); - builtin.insert(entry("cosd",Builtin(cosd,dcosd))); - builtin.insert(entry("tand",Builtin(tand,dtand))); - builtin.insert(entry("asin",Builtin(asin,dasin))); - builtin.insert(entry("acos",Builtin(acos,dacos))); - builtin.insert(entry("atan",Builtin(atan,datan))); - builtin.insert(entry("asind",Builtin(asind,dasind))); - builtin.insert(entry("acosd",Builtin(acosd,dacosd))); - builtin.insert(entry("atand",Builtin(atand,datand))); - builtin.insert(entry("exp",Builtin(exp,dexp))); - builtin.insert(entry("log",Builtin(log,dlog))); - builtin.insert(entry("sqr",Builtin(sqr,dsqr))); - builtin.insert(entry("cube",Builtin(cube,dcube))); - builtin.insert(entry("sqrt",Builtin(sqrt,dsqrt))); -} - -/* - Initialization routine -*/ -void PdfFit::init() // called setup in Fortran program -{ - fit.init_builtins(); -} - -void PdfFit::setphase(int ip) -{ - if ((ip<1) || (ip > nphase)) - { - stringstream eout; - eout << "Warning: phase " << ip << " undefined"; - throw unassignedError(eout.str()); - } - - Phase &phase=*this->phase[ip-1]; - - curphase = &phase; - - lat.resize(6); - lat[0].setptr(&phase.a0[0]); - lat[1].setptr(&phase.a0[1]); - lat[2].setptr(&phase.a0[2]); - lat[3].setptr(&phase.win[0]); - lat[4].setptr(&phase.win[1]); - lat[5].setptr(&phase.win[2]); - - pscale.setptr(&phase.pscale); - spdiameter.setptr(&phase.spdiameter); - stepcut.setptr(&phase.stepcut); - delta2.setptr(&phase.delta2); - delta1.setptr(&phase.delta1); - sratio.setptr(&phase.sratio); - rcut.setptr(&phase.rcut); - - x.resize(phase.natoms); - y.resize(phase.natoms); - z.resize(phase.natoms); - u11.resize(phase.natoms); - u22.resize(phase.natoms); - u33.resize(phase.natoms); - u12.resize(phase.natoms); - u13.resize(phase.natoms); - u23.resize(phase.natoms); - occ.resize(phase.natoms); - - for(int ia=0; ia nset)) - { - stringstream eout; - eout << "Warning: set " << is << " undefined"; - throw unassignedError(eout.str()); - } - - DataSet* pds = this->datasets[is-1]; - - curset = pds; - - dscale.setptr( &(pds->dscale) ); - qdamp.setptr( &(pds->qdamp) ); - qbroad.setptr( &(pds->qbroad) ); -} - - -const vector& DataSet::getpdf_obs() -{ - return this->obs; -} - - -const vector& DataSet::getpdf_fit() -{ - if (this->pdftot.empty()) - { - size_t n = this->obs.size(); - this->pdftot.assign(n, 0.0); - } - return this->pdftot; -} - - -vector PdfFit::getpdf_obs() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->getpdf_obs(); -} - -vector PdfFit::getpdf_fit() -{ - if (!curset) - { - throw unassignedError("No fit data"); - } - return curset->getpdf_fit(); -} - -int PdfFit::getnfmin() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->nfmin; -} - -int PdfFit::getnfmax() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->nfmax; -} - -double PdfFit::getdeltar() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->deltar; -} - -double PdfFit::getrmin() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->rmin; -} - -double PdfFit::getrmax() -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->rmax; -} - -vector PdfFit::getcrw() const -{ - if (!curset) - { - throw unassignedError("No data loaded"); - } - return curset->getcrw(); -} - -map > PdfFit::getPhaseFractions() -{ - if (!curset) - { - const char* emsg = "Dataset not defined, unknown scattering type"; - throw unassignedError(emsg); - } - map > rv; - vector< pair > atomfractions; - vector< pair > cellfractions; - vector< pair > massfractions; - atomfractions = curset->getAtomPhaseFractions(); - cellfractions = curset->getCellPhaseFractions(); - massfractions = curset->getMassPhaseFractions(); - size_t n = atomfractions.size(); - for (size_t i = 0; i != n; ++i) - { - rv["atom"].push_back(atomfractions[i].first); - rv["stdatom"].push_back(atomfractions[i].second); - rv["cell"].push_back(cellfractions[i].first); - rv["stdcell"].push_back(cellfractions[i].second); - rv["mass"].push_back(massfractions[i].first); - rv["stdmass"].push_back(massfractions[i].second); - } - return rv; -} - -double PdfFit::get_scat(char tp, string smbpat) -{ - double rv; - const LocalPeriodicTable* lpt = this->curphase ? - this->curphase->getPeriodicTable() : - LocalPeriodicTable::instance(); - const AtomType* atp = lpt->lookup(smbpat); - try { - rv = atp->sf(tp); - } - catch (runtime_error e) { - throw ValueError(e.what()); - } - return rv; -} - -// End of file diff --git a/src/extensions/libpdffit2/pdffit.h b/src/extensions/libpdffit2/pdffit.h deleted file mode 100644 index a4b030ac..00000000 --- a/src/extensions/libpdffit2/pdffit.h +++ /dev/null @@ -1,611 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* classes Phase, DataSet, Fit, Pdf, PdfFit, RefVar, NonRefVar, Builtin -* -* Comments: Main header file included by all others. Big mess. -* -***********************************************************************/ - -#ifndef PDFFIT_H_INCLUDED -#define PDFFIT_H_INCLUDED - -#include -#include -#include -#include -#include -#include - -#include "AtomType.h" -#include "Atom.h" -#include "PairDistance.h" -#include "matrix.h" -#include "exceptions.h" -#include "LocalPeriodicTable.h" -#include "OutputStreams.h" - -using namespace std; - -/*********************************************************************** - * Here are constants for the parameter coding - DO NOT CHANGE - * unless you are rewriting the program !!!!!!!!!!!!!!!!!!!!!! - *********************************************************************** - * - * n_st : Number of global structural parameters per phase - * n_at : Number of parameters for each atom - * n_ex : Number of experimental parameters per dataset - * - ***********************************************************************/ - -const int n_st = 11; -const int n_at = 10; -const int n_ex = 3; - -const int ALL = -1; -typedef vector::iterator VAIT; - -enum FCON { USER, IDENT, FCOMP, FSQR }; - -typedef double (*fbuiltin)(double); - -class Fit; -class PdfFit; -class DataSet; -class Phase; -class NonRefVar; -class RefVar; - - -// non-refinable variables accessible to the users -class NonRefVar -{ - friend class PdfFit; - double *a; - - public: - NonRefVar() : a(NULL) - { - mtype = "NonRefVar"; - } - bool isAssigned() { return (a != NULL); } - void setptr(double* a) { this->a = a; } - void setval(double a) { *this->a = a; } - double get() { - double rv = (a) ? *a : 0.0; - return rv; - } - const string& type() const - { - return mtype; - } - - protected: - string mtype; -}; - -// Refinable variables accessible to the users -class RefVar: public NonRefVar -{ - friend class PdfFit; - public: - RefVar() : NonRefVar() - { - mtype = "RefVar"; - } -}; - - -typedef double (*fcon)(vector&, vector&); -typedef double (*fbuiltin) (double); - -// TK commented out 03/31/05 -// class Builtin { fbuiltin func, deriv; -// public: -// Builtin(fbuiltin func, fbuiltin deriv): func(func), deriv(deriv) {} -// }; - -// TK 03/31/05 replaced above with -class Builtin { - public: - fbuiltin func, deriv; // made these public. - // Really should just be a struct, or provide - // const pointers. - Builtin(fbuiltin func, fbuiltin deriv): func(func), deriv(deriv) {} -}; - -// contains the address of the variable, and the current value of the parameter -class Fit -{ - friend class PdfFit; - - map builtin; - - double parse(string line, vector &dnumdp); - double compute(string &expr, vector &dnumdp); - string substitute_pars(string &expr); - double getnum(istringstream &inexpr, vector &dnumdp); - void init_builtins(); - void reset(); - - public: - Fit() - { - reset(); - } - - // CLF Wed May 25 2005 - // Made these members of fit. Were local variables to - // refine function. - double alambda, chisq, ochisq; - int stagnating; - // CLF - - int iter; - double fit_rw; - double redchisq; // reduced chi-squared - double wnorm; // sum of weighted squared datapoints - int ntot, ndof; // total # of points, number of degrees of freedom - // parameter related variables - vector p; // fit-parameters - vector dp; // errors on the refined parameters; - vector id; // parameter identification number (arbitrary integer) - vector ip; // parameter selection - matrix covar, alpha; // covariance matrix and curvature - - // constraint related variables - vector var; // constrained variables - vector dvar; // errors on the constrained variables - vector vref; // true if variable contains free parameters - matrix vcovar; // covariance matrix on constrained variables - vector fconstraint; // constraint equations - vector form; // constraint formula - vector idef; // default parameter if no explicit constraint - vector ctype; // type of constraint - - vector used; // vector of used parameter indices (not ids) in the current constraint - - // variables relating constraint-parameter - matrix dvdp; // derivative of var wrt p - - // variables relating to refinable variables - vector sdptr; // pointer to standard deviation of refinable variable - - vector refvar; // integer pointer from refinable variable to actual constraint # - - void fixpar(int pidx); - void freepar(int pidx); - void setpar(unsigned int pidx, double val); - double getpar(unsigned int pidx); - void constrain(double &a, string form); - void constrain(double &a, double f(vector&, vector&) ); - void constrain(double &a, int ipar ); - void constrain(double &a, int ipar, FCON type); - void constrain(double &a, string inpform, fcon f, int idef, FCON type); - int vfind(double &a); // look for variable in list of constraints - int parfind(unsigned int j); - void fill_variables(); - void fill_errors(); - int varsize() const { return var.size(); } - int psize() const { return p.size(); } - //Thu Oct 13 2005 - CLF - void output(ostream &fout); - void out(); - - private: - vector order_by_id() const; - -}; - -class PdfFit -{ - // class methods - - public: - static const string& version(const char* ver=NULL); - - private: - - //Struct cr; - int nphase; - int total; // total # of atoms - vector phase; - - Fit fit; - - // Dataset parameters - int nset; - vector datasets; - DataSet *curset; - - void init(); - - public: - - void fit_setup(); - void fit_errors(); - void fit_theory(bool ldiff, bool lout); - double totalWeighedSquareObs() const; - int totalReducedObservations() const; - - private: - - void initarrays(); - - void mrqmin(vector &a, vector &ia, matrix &covar, - matrix &alpha, double &chisq, double &alamda, - bool deriv); - void mrqmin(double a[], int ia[], int ma, double **covar, - double **alpha, double *chisq, double *alamda, bool deriv); - void mrqcof(double*, int*, int, double**, double*, double*, bool deriv); - void fill_variables(vector a); - int getnpar() { return nset*n_ex + nphase*n_st + total*n_at; } - - public: - - Phase* curphase; - PdfFit(); - ~PdfFit(); - - void alloc(char tp, double qmax, double qdamp, - double rmin, double rmax, int bin); - void calc(); - int read_struct(string fname); // returns 1:OK, 0:Error - int read_data(string fname, char tp, double qmax, double qdamp); - //Wed Oct 12 2005 - CLF - int read_struct_string(char * buffer); // returns 1:OK, 0:Error - int read_data_string(string& buffer, char tp, double qmax, double - qdamp, string name = "string"); - int read_data_arrays(char tp, double qmax, double qdamp, int length, - double * r_data, double * Gr_data, double * dGr_data = NULL, - string name = "array"); - void reset(); - //Thu Oct 13 2005 - CLF - string save_pdf(int iset, string fname = ""); - string save_dif(int iset, string fname = ""); - string save_res(string fname = ""); - string save_struct(int ip, string strucfile = ""); - string show_struct(int ip); - // - int refine(bool deriv, double toler = 0.00000001); - int refine_step(bool deriv, double toler = 0.00000001); - double getrw(void) - { - return fit.fit_rw; - } - void setpar(unsigned int pidx, double val) - { - fit.setpar(pidx, val); - } - void setpar(unsigned int pidx, RefVar v) - { - fit.setpar(pidx, *v.a); - } - double getpar(unsigned int pidx) - { - return fit.getpar(pidx); - } - void fixpar(int pidx) - { - fit.fixpar(pidx); - } - void freepar(int pidx) - { - fit.freepar(pidx); - } - void range(int iset, double rmin, double rmax); - - void constrain(RefVar v, double f(vector&, vector&)) - { - fit.constrain(*v.a,f); - } - void constrain(RefVar v, string form) - { - fit.constrain(*v.a,form); - } - void constrain(RefVar v, int ipar) - { - fit.constrain(*v.a,ipar); - } - void constrain(RefVar v, int ipar, FCON type) - { - fit.constrain(*v.a,ipar,type); - } - void setphase(int ip); - void setdata(int is); - void setvar(RefVar v, double a) { v.setval(a); } - double getvar(RefVar v) { return v.get(); } - void setvar(NonRefVar v, double a) { v.setval(a); } - double getvar(NonRefVar v) { return v.get(); } - - void selphase(int ip); - void pdesel(int ip); - Phase* getphase(int ip); - int num_phases() { return this->nphase; } - int num_datasets() { return this->nset; } - - private: - - void check_sel_args(int ip, char ijchar, int aidx1=1); - void selphaseForEachDataSet(Phase*); - - public: - - void selectAtomType(int ip, char ijchar, char* symbol, bool select); - void selectAtomIndex(int ip, char ijchar, int aidx1, bool select); - void selectAll(int ip, char ijchar); - void selectNone(int ip, char ijchar); - - pair bond_angle(int ia, int ja, int ka); - PairDistance bond_length_atoms(int ia, int ja); - vector bond_length_types(string symi, string symj, - double bmin, double bmax); - - vector getpdf_obs(); - vector getpdf_fit(); - - // current phase and set refinable variable pointers - vector lat, x, y, z, u11, u22, u33, u12, u13, u23, occ; - RefVar pscale; - RefVar spdiameter; - NonRefVar stepcut; - RefVar sratio; - RefVar delta2, delta1; - RefVar dscale, qdamp, qbroad; - NonRefVar rcut; - int getnfmin(); - int getnfmax(); - double getdeltar(); - double getrmin(); - double getrmax(); - vector getcrw() const; - map > getPhaseFractions(); - double get_scat(char tp, string smbpat); -}; - -class Pdf -{ - public: - - int nfmin, nfmax, ncmin, ncmax; - double qmax, qdamp, rmin, rmax, deltar; - double rfmin, rfmax; // fit range - double rcmin, rcmax; // extended calculation range - double dscale, ddscale, qbroad, dqbroad, dqdamp; - - Pdf() - { - nfmin = nfmax = ncmin = ncmax = 0; - qmax = qdamp = rmin = rmax = deltar = 0.0; - rfmin = rfmax = rcmin = rcmax = 0.0; - dscale = 0.0; ddscale = 0.0; - qbroad = dqbroad = dqdamp = 0.0; - } - - vector pdftot; // total pdf - matrix calc; // ?? pdf for each phase and each point in the dataset -}; - -class DataSet: public Pdf -{ - - private: - int offset; - const PdfFit* mowner; - void applyQmaxCutoff(double* y, size_t len); - void extendCalculationRange(bool lout); - string selectedAtomsString(int ip, char ijchar); - void read_data_stream(int iset, istream& fdata, - char tp, double qmax, double qdamp, string name); - void warningOnMissingWeights() const; - - public: - - int iset; // Dataset index - char scattering_type; - string name; - - DataSet(const PdfFit* owner) : Pdf(), mowner(owner) - { - dscale = 1.0; ddscale = 0; - qbroad = dqbroad = 0.0; - }; - // pdf-related - void determine(bool ldiff, bool lout, Fit &par); - void pdf_derivative (Phase& phase, - const Atom& atomi, const Atom& atomj, double rk, double sigma, - double sigmap, double dist, double d[3], double ampl, - double gaus, Fit &fit, double* fit_a_i); - - const vector& getpdf_fit(); - const vector& getpdf_obs(); - //Thu Oct 13 2005 - CLF - string build_pdf_file(); - string build_dif_file(); - // - void read_data(int iset, string fname, char tp, double qmax, double qdamp); - //Wed Oct 12 2005 - CLF - void read_data_string(int iset, string& buffer, char tp, double qmax, double qdamp, - string name = "string"); - void read_data_arrays(int iset, char tp, double qmax, double qdamp, - int length, double * r_data, double * Gr_data, double * dGr_data = NULL, string name = "array"); - // - //Thu Oct 13 2005 - CLF - void output(ostream &fout); - void range(double rmin, double rmax); - - void fit_setup_derivatives(Fit &par); - void selphase(int ip, Phase *phase); - - vector getcrw() const; - double weighedSquareObs() const; - double getdsrw() const; - double getdsredchisq() const; - - // phase fraction calculations - vector< pair > getAtomPhaseFractions(); - vector< pair > getCellPhaseFractions(); - vector< pair > getMassPhaseFractions(); - - // fit related - matrix fit_a, fit_b; // nbin*npar - - int bin; - vector obs, wic; - - // phase specific information this dataset: selected, allowed atoms - vector psel; // phase selection - // i and j indices to be ignored when calculating PDF - map > phase_ignore_i; - map > phase_ignore_j; - vector cumchisq; - friend void PdfFit::fit_setup(); - -}; - -class Phase { - - private: - - // data - string spcgr, name; - int offset; - LocalPeriodicTable _local_periodic_table; - - double ar[3], wrez[3], dar[3], dwrez[3]; - double gten[3][3], dgten[3][3]; // tensor and sd - double rten[3][3], drten[3][3]; // tensor and sd - double _eps[3][3][3], _reps[3][3][3], _deps[3][3][3], _dreps[3][3][3]; - double &eps(int i, int j, int k) { return _eps[i][j][k]; } - double &reps(int i, int j, int k) { return _reps[i][j][k]; } - double &deps(int i, int j, int k) { return _deps[i][j][k]; } - double &dreps(int i, int j, int k) { return _dreps[i][j][k]; } - - // methods - - set selectAtomsOf(string symbol); - - // Added a return value - string get_scat_string(char tp, const AtomType* atp); - - // shift to equivalent lattice position nearest to the origin - void make_nearest(double xyz[3]); - - public: - - vector atom_types; - int iphase; - double cosa, cosb, cosg, sina, sinb, sing; - double v, dv, vr, dvr; - int icc[3]; - // Phase has a number of public elements as it is often cross-referenced - - int natoms; // total number of atoms in multicell icc0 x icc1 x icc2 - int ncatoms; // number of atoms in one cell - - // IMPORTANT: atom[i].atom_type must be a pointer to AtomType - // from _local_periodic_table. Insertion of a new entry to - // vector atom must be followed by reassign_atom_type(entry); - vector atom; - - double pscale, dpscale; - double a0[3], win[3], da0[3], dwin[3]; - double np, dnp, rho0, drho0; // np: total occupance, rho0: number density - - // pdf-related - double delta2, sratio, rcut; - double ddelta2, dsratio, delta1, ddelta1; - double spdiameter, dspdiameter; // spherical particle diameter - double stepcut; - double dnorm, corr_max; - - - Phase() - { - pscale = 1.0; dpscale = 0.0; - sratio=1.0; - a0[0] = a0[1] = a0[2] = da0[0] = da0[1] = da0[2] = - win[0] = win[1] = win[2] = dwin[0] = dwin[1] = dwin[2] = - delta2 = ddelta2 = dsratio = rcut = 0.0; - delta1 = ddelta1 = corr_max = 0.0; - spdiameter = dspdiameter = 0.0; - stepcut = 0.0; - icc[0] = icc[1] = icc[2] = ncatoms = natoms = 0; - spcgr = "P1"; - name = "UNNAMED"; - } - inline size_t nscat() - { - return atom_types.size(); - } - void read_struct(int iphase, string fname); - void read_struct_string(int iphase, char * buffer); - private: - void read_struct_stream(int _iphase, istream& fstruct); - void read_header(istream &fstruct, bool &ldiscus); - void read_atoms(istream &fstruct); - // Reset atom_type to point to an entry from _local_periodic_table - void reassign_atom_type(Atom* ap); - - public: - //Thu Oct 13 2005 - CLF - void output(ostream &fout); - template void save_struct(Stream &fout); - - void lattice(); - void show_lattice(); - void tensor(double ten[3][3], double vec[3], double win[3]); - void dtensor(double vec[3], double win[3], double dten[3][3], double dvec[3], double dwin[3]); - - double skalpro(const double h[3], const double k[3]); - double dskalpro(double h[3], double k[3], double dh[3], double dk[3]); - - double circum_diameter(); // diameter of a sphere enclosing unit cell - // mean square displacement of 2 atoms - double msdAtoms(const Atom& ai, const Atom& aj, double* vl); - // reference to the local periodic table - LocalPeriodicTable* getPeriodicTable(); - - // pdf-related - - double averageAtomicMass(); - double averageScatteringFactor(char tp); - void setup_weights(char tp); - - pair bond_angle(int ia, int ja, int ka); - PairDistance bond_length_atoms(int ia, int ja); - vector bond_length_types(string symi, string symj, - double bmin, double bmax); - // Fri Oct 28 2005 - CLF - // Added a return value - void show_scat(char tp); - string get_scat_string(char tp); - string get_scat_string(char tp, string smbpat); - void set_scat(char tp, const string& smbpat, double value); - void reset_scat(const string& smbpat); - - friend class Atom; - friend class DataSet; - friend void PdfFit::fit_setup(); - friend void DataSet::fit_setup_derivatives(Fit &par); - friend void DataSet::determine(bool ldiff, bool lout, Fit &par); - friend void DataSet::pdf_derivative (Phase& phase, - const Atom& atomi, const Atom& atomj, double rk, double sigma, - double sigmap, double dist, double d[3], double ampl, - double gaus, Fit &fit, double* fit_a_i); - friend void PdfFit::fit_theory(bool ldiff, bool lout); -}; - - -#endif // PDFFIT_H_INCLUDED diff --git a/src/extensions/libpdffit2/pdflsmin.cc b/src/extensions/libpdffit2/pdflsmin.cc deleted file mode 100644 index 74c7d075..00000000 --- a/src/extensions/libpdffit2/pdflsmin.cc +++ /dev/null @@ -1,326 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PdfFit methods for Levenberg-Marquardt least-squares minimization. -* -* Comments: -* -***********************************************************************/ - -//#define CHECK_DERIVATIVES - -#include -#include -#include -#include -#include - -#include "MathUtils.h" -#include "matrix.h" -#include "nrutil.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -void PdfFit::mrqmin(vector &a, vector &ia, matrix &covar, - matrix &alpha, double &chisq, double &alamda, bool deriv) -{ - using std::copy; - - int ma = a.size(); - double** _covar = new double*[ma]; - double** _alpha = new double*[ma]; - double* _a = new double[ma]; - - copy(a.begin(), a.end(), _a); - - for (int i = 0; i < ma; i++) - { - _covar[i] = &covar[i][0]-1; - _alpha[i] = &alpha[i][0]-1; - } - - int* iaptr = ia.size() ? &(ia[0]) - 1 : NULL; - mrqmin(_a-1, iaptr, ma, _covar-1, _alpha-1, &chisq, &alamda, deriv); - - copy(_a, _a + ma, a.begin()); - - delete [] _a; - delete [] _alpha; - delete [] _covar; -} - - -// Levenberg-Marquardt method, attempting to reduce the value Chi2 of a fit -// between a set of data points x[1..ndata], y[1..ndata] with individual -// standard deviations sig[1..ndata], and a nonlinear function dependent on ma -// coefficients a[1..ma]. The input array ia[1..ma] indicates by nonzero -// entries those components of a that should be fitted for, and by zero entries -// those components that should be held fixed at their input values. The -// program re- turns current best-fit values for the parameters a[1..ma], and -// Chi2=chisq. The arrays covar[1..ma][1..ma], alpha[1..ma][1..ma] are used as -// working space during most iterations. Supply a routine -// funcs(x,a,yfit,dyda,ma) that evaluates the fitting function yfit, and its -// derivatives dyda[1..ma] with respect to the fitting parameters a at x. On -// the first call provide an initial guess for the parameters a, and set -// alamda<0 for initialization (which then sets alamda=.001). If a step -// succeeds chisq becomes smaller and alamda de- creases by a factor of 10. If -// a step fails alamda grows by a factor of 10. You must call this routine -// repeatedly until convergence is achieved. Then, make one final call with -// alamda=0, so that covar[1..ma][1..ma] returns the covariance matrix, and -// alpha the curvature matrix. (Parameters held fixed will return zero -// covariances.) -void PdfFit::mrqmin(double a[], int ia[], int ma, double **covar, double **alpha, double *chisq, double *alamda, bool deriv) -{ - void covsrt(double **covar, int ma, int ia[], int mfit); - void gaussj(double **a, int n, double **b, int m); - - int j, k, l; - static int mfit; - static double ochisq, *atry, *beta, *da, **oneda; - - if (*alamda < 0.0) - { - // Initialization. - atry = dvector(1, ma); - beta = dvector(1, ma); - da = dvector(1, ma); - - for (mfit = 0, j = 1; j <= ma; j++) - if (ia[j]) mfit++; - - oneda = dmatrix(1, mfit, 1, 1); - *alamda = 0.001; - mrqcof(a, ia, ma, alpha, beta, chisq, deriv); - ochisq=(*chisq); - for (j = 1; j <= ma; j++) atry[j]=a[j]; - - *pout << "\n******************************** ITER: " << fit.iter << " ********************************\n"; - fit.fit_rw = sqrt(ochisq/fit.wnorm); - fit.redchisq = ochisq/(fit.ntot-fit.ndof); - fit.out(); - *pout << " chisq.: " << ochisq << " red.chisq.: " << fit.redchisq << " Rw: " << fit.fit_rw << endl; - } - // Alter linearized fitting matrix, by augmenting diagonal elements. - for (j = 1; j <= mfit; j++) - { - for (k = 1; k <= mfit; k++) covar[j][k]=alpha[j][k]; - covar[j][j]=alpha[j][j]*(1.0+(*alamda)); - oneda[j][1]=beta[j]; - } - - //=================================================================== -#if defined(TEST) - print(covar, mfit); double **save = dmatrix(1, mfit, 1, mfit); - for(int i = 1; i <= mfit; i++) for(j = 1; j <= mfit; j++) save[i][j] = covar[i][j]; - for(int i = 1; i <= mfit; i++) printf("%lg ", oneda[i][1]); printf("\n"); -#endif - //=================================================================== - - gaussj(covar, mfit, oneda, 1); // Matrix solution. - - //=================================================================== -#if defined(TEST) - double res; - for(int i = 1; i <= mfit; i++) - { - res = 0; - for(j = 1; j <= mfit; j++) - res += save[i][j]*oneda[j][1]; printf("%lg ", res); - } - printf("\n"); -#endif - //================================================================= - - for (j = 1; j <= mfit; j++) da[j]=oneda[j][1]; - if (*alamda == 0.0) { // Once converged, evaluate covariance matrix. - covsrt(covar, ma, ia, mfit); - covsrt(alpha, ma, ia, mfit); // Spread out alpha to its full size too. - free_dmatrix(oneda, 1, mfit, 1, 1); - free_dvector(da, 1, ma); - free_dvector(beta, 1, ma); - free_dvector(atry, 1, ma); - return; - } - for (j = 0, l = 1; l <= ma; l++) // Did the trial succeed? - if (ia[l]) atry[l]=a[l]+da[++j]; - mrqcof(atry, ia, ma, covar, da, chisq, deriv); - if (*chisq < ochisq) { // Success, accept the new solution. - *alamda *= 0.1; - ochisq=(*chisq); - for (j = 1; j <= mfit; j++) { - for (k = 1; k <= mfit; k++) alpha[j][k]=covar[j][k]; - beta[j]=da[j]; - } - for (l = 1; l <= ma; l++) a[l]=atry[l]; - } else { // Failure, increase alamda and return. - *alamda *= 10.0; - *chisq = ochisq; - } -} - -// Used by mrqmin to evaluate the linearized fitting matrix alpha, and -// vector beta as in (15.5.8), and calculate Chi2. -void PdfFit::mrqcof(double a[], int ia[], int ma, double **alpha, double beta[], double *chisq, bool deriv) -{ - int i, j, k, l, m, mfit = 0; - double wt, sig2i, dy, *dyda; - //double ymod; - - dyda = dvector(1, ma); - for (j = 1; j <= ma; j++) - if (ia[j]) mfit++; - for (j = 1; j <= mfit; j++) { // Initialize (symmetric) alpha, beta. - for (k = 1; k <= j; k++) alpha[j][k]=0.0; - beta[j]=0.0; - } - - // careful: a of mrqcof is in fact atry of mrqmin! - for (j = 1; j <= ma; j++) - fit.p[j-1] = a[j]; - - // printf("a=%.12lg %.12lg %.12lg\n", a[1], a[2], a[3]); - - fit_theory(deriv, false); // yields pdftot and derivatives wrt parameters - - //============================================================================= -#if !defined(CHECK_DERIVATIVES) - // deriv: true for analytic derivatives, false for numerical ones - if (!deriv) -#endif - { -#if defined(CHECK_DERIVATIVES) - matrix dersave = datasets[0]->fit_b; -#endif - - // numerical derivative - vector > pdfsave; - for (int is = 0; is < nset; is++) - { - pdfsave.push_back(datasets[is]->pdftot); - - // fit_b used both in numerical and analytical derivative case - datasets[is]->fit_b.clear(); - datasets[is]->fit_b.resize(datasets[is]->ncmax+1, fit.psize()); - } - - double psave; - - if (fit.psize() != ma) { - throw constraintError("Inconsistent number of parameters"); - } - - for (int ip = 0; ip < fit.psize(); ip++) - { - if (!fit.ip[ip]) continue; - - double delta = double_eps*fit.p[ip]; - if (fabs(delta) < double_eps/100) delta = double_eps; - psave = fit.p[ip]; - fit.p[ip] += delta; - fit_theory(false, false); // yields pdftot and derivatives wrt parameters - fit.p[ip] = psave; - - for (int is = 0; is < nset; is++) - { - DataSet* pds = this->datasets[is]; - - for (i = pds->nfmin; i <= pds->nfmax; i++) - { - pds->fit_b[i][ip] = (pds->pdftot[i]-pdfsave[is][i])/delta; - } - } - -#if defined(CHECK_DERIVATIVES) - i = 200; - { - *pout << "DERIVATIVES:: ANALYTIC : " << dersave[i][ip] << endl; - *pout << " NUMERICAL: " << (datasets[0]->pdftot[i]-pdfsave[0][i])/delta - << " (delta[" << fit.id[ip] << "]=" << delta << ")" << endl << endl; - } -#endif - } - for (int is = 0; is < nset; is++) datasets[is]->pdftot = pdfsave[is]; - -#if defined(CHECK_DERIVATIVES) - exit(0); -#endif - } - //============================================================================= - - *chisq = 0.0; - - for (int is = 0; is < nset; is++) - { - DataSet* pds = this->datasets[is]; - pds->cumchisq.clear(); - - for (i = pds->nfmin; i <= pds->nfmax; i++) - { // Summation loop over all data. - - //(*funcs)(x[i], a, &ymod, dyda, ma); - sig2i = pds->wic[i]; - dy = pds->obs[i] - pds->pdftot[i]; - - for (j = 1; j <= ma; j++) - dyda[j] = pds->fit_b[i][j-1]; // of course use fit_b, NOT fit_a - - //if (i==0) printf("dyda=%.12lg %.12lg %.12lg\n", dyda[1], dyda[2], dyda[3]); - - for (j = 0, l = 1; l <= ma; l++) { - if (ia[l]) { - wt = dyda[l]*sig2i; - for (j++, k = 0, m = 1; m <= l; m++) - if (ia[m]) alpha[j][++k] += wt*dyda[m]; - beta[j] += dy*wt; - } - } - double prev = pds->cumchisq.empty() ? 0.0 : pds->cumchisq.back(); - double chisq_contribution = dy * dy * sig2i; - pds->cumchisq.push_back(prev + chisq_contribution); - } - *chisq += pds->cumchisq.empty() ? 0.0 : pds->cumchisq.back(); - } - for (j = 2; j <= mfit; j++) // Fill in the symmetric side. - for (k = 1; k < j; k++) alpha[k][j]=alpha[j][k]; - free_dvector(dyda, 1, ma); - //print(alpha, ma); -} - - -// Expand in storage the covariance matrix covar, so as to take into account -// parameters that are being held fixed. (For the latter, return zero -// covariances.) -void covsrt(double **covar, int ma, int ia[], int mfit) -{ - int i, j, k; - for (i = mfit+1; i <= ma; i++) - { - for (j = 1; j <= i; j++) - { - covar[i][j]=covar[j][i]=0.0; - } - } - k = mfit; - for (j = ma; j >= 1; j--) { - if (ia[j]) - { - for (i = 1; i <= ma; i++) swap(covar[i][k], covar[i][j]); - for (i = 1; i <= ma; i++) swap(covar[k][i], covar[j][i]); - k--; - } - } -} - -// End of file diff --git a/src/extensions/libpdffit2/scatlen.cc b/src/extensions/libpdffit2/scatlen.cc deleted file mode 100644 index 81beee03..00000000 --- a/src/extensions/libpdffit2/scatlen.cc +++ /dev/null @@ -1,114 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Phase methods for accessing scattering factors. -* -* Comments: Up to date with 1.3.10 Fortran version. -* In Fortran this was fourier.f -* -***********************************************************************/ - -#include -#include - -#include "LocalPeriodicTable.h" -#include "StringUtils.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - -void Phase::show_scat(char tp) -{ - *pout << get_scat_string(tp); -} - -string Phase::get_scat_string(char tp) -{ - stringstream sout; - vector::iterator atp; - for (atp = atom_types.begin(); atp != atom_types.end(); ++atp) - { - sout << get_scat_string(tp, *atp); - } - return sout.str(); -} - -string Phase::get_scat_string(char tp, string smbpat) -{ - const LocalPeriodicTable* lpt = getPeriodicTable(); - const AtomType* atp = lpt->lookup(smbpat); - return get_scat_string(tp, atp); -} - -string Phase::get_scat_string(char tp, const AtomType* atp) -{ - stringstream sout; - string usymbol = toupper(atp->symbol); - switch(tp) - { - case 'n': - case 'N': - sout << "Neutron scattering length for " << usymbol << " : "; - break; - case 'x': - case 'X': - sout << "X-ray scattering factor for " << usymbol << " : "; - break; - } - // this also throws runtime_error for invalid tp value - sout << atp->sf(tp); - return sout.str(); -} - -void Phase::set_scat(char tp, const string& smbpat, double value) -{ - LocalPeriodicTable* lpt = getPeriodicTable(); - const string& stdsmbl = lpt->lookup(smbpat)->symbol; - switch (tp) - { - case 'n': - case 'N': - lpt->setNsf(stdsmbl, value); - break; - case 'x': - case 'X': - lpt->setXsf(stdsmbl, value); - break; - default: - ostringstream emsg; - emsg << "Invalid scattering type '" << tp << "'"; - throw runtime_error(emsg.str()); - } - const AtomType* atp = lpt->symbol(stdsmbl); - *pout << get_scat_string(tp, atp); -} - -void Phase::reset_scat(const string& smbpat) -{ - LocalPeriodicTable* lpt = getPeriodicTable(); - const AtomType* atp = lpt->lookup(smbpat); - const string& stdsmbl = atp->symbol; - lpt->reset(stdsmbl); - *pout << get_scat_string('N', stdsmbl); - *pout << get_scat_string('X', stdsmbl); -} - - -LocalPeriodicTable* Phase::getPeriodicTable() -{ - return &this->_local_periodic_table; -} - - -// End of file diff --git a/src/extensions/libpdffit2/stru.cc b/src/extensions/libpdffit2/stru.cc deleted file mode 100644 index 4f1a6a60..00000000 --- a/src/extensions/libpdffit2/stru.cc +++ /dev/null @@ -1,837 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Jacques Bloch -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* PdfFit and Phase methods for reading and saving the structure, -* and for calculating bond lengths and angles. -* -* Comments: -* -***********************************************************************/ - -// Up to date with 1.3.10 Fortran version - -#include -#include -#include -#include - -#include "PointsInSphere.h" -#include "LocalPeriodicTable.h" -#include "Atom.h" -#include "StringUtils.h" -#include "PairDistance.h" -#include "MathUtils.h" -#include "pdffit.h" - -using NS_PDFFIT2::pout; - - -/*********************************************************************** -* local helper routines -***********************************************************************/ - -namespace { - -// Read a number and an eventual comma delimiter or EOF -template Type vget(istringstream &fin, char delim) -{ - char c; - Type val; - - fin >> val; - - // Return if reading error - if (!fin) { - string line; - fin.clear(); - fin >> line; - throw vgetException(line); - } - if (!fin) return 0; - - // check on end of file before looking for delimiter - if (fin.eof()) return val; - - // read eventual delimiter - fin >> c; - - // if a character c has been read and it is not the expected - // delimiter: put back for next reading - if (fin && c != delim) fin.unget(); - - // clear any error in case no delimiter could be read - if (!fin) fin.clear(); - - return val; -} - -// read space delimited value -template Type vget(istringstream &fin) -{ - Type val; - fin >> val; - return val; -} - -// read space or comma delimited double -double dget(istringstream &fin) -{ - return vget(fin, ','); -} - -// read space or comma delimited integer -int iget(istringstream &fin) -{ - return vget(fin, ','); -} - - -// strip leading spaces -string lstrip(const string &line) -{ - string naked; - string::size_type i = line.find_first_not_of(" \t"); - if (i != string::npos) naked = line.substr(i); - return naked; -} - -// substitute all occurrences of literal pattern with new string -void substitute(string& s, const string& pat, const string& sub) -{ - string::size_type p; - string::size_type start = 0; - for (p = s.find(pat, start); p != string::npos; p = s.find(pat, start)) - { - s = s.replace(p, pat.size(), sub); - start = p + sub.size(); - } -} - - -} // local namespace - - -/*********************************************************************** -* Read a structure file. -***********************************************************************/ -int PdfFit::read_struct(string structfile) -{ - Phase* ph = new Phase(); - try { - ph->read_struct(nphase+1, structfile); - } - catch(Exception e) { - delete ph; - // Moved error catching to python bindings. - throw; - } - this->phase.push_back(ph); - this->total += ph->natoms; - this->nphase++; - this->selphaseForEachDataSet(ph); - this->setphase(this->nphase); - ph->show_lattice(); - return 1; -} - -/*********************************************************************** - Wed Oct 12 2005 - CLF - Read a structure from a storage string. -*************************************************************************/ -int PdfFit::read_struct_string(char * buffer) -{ - Phase* ph = new Phase(); - try { - ph->read_struct_string(nphase+1, buffer); - } - catch(Exception e) { - delete ph; - throw; - } - this->phase.push_back(ph); - this->total += ph->natoms; - this->nphase++; - this->selphaseForEachDataSet(ph); - this->setphase(this->nphase); - ph->show_lattice(); - return 1; -} - -void Phase::read_struct(int _iphase, string structfile) -{ - ifstream fstruct; - - fstruct.open(structfile.c_str()); - if (!fstruct) throw IOError("File does not exist"); - - read_struct_stream(_iphase, fstruct); -} - -void Phase::read_struct_string(int _iphase, char * buffer) -{ - istringstream fstruct(buffer); - read_struct_stream(_iphase, fstruct); -} - -void Phase::read_struct_stream(int _iphase, istream& fstruct) -{ - double tot; - bool ldiscus; - - iphase = _iphase; - natoms = 0; - - read_header(fstruct, ldiscus); - - if (ldiscus) - { - *pout << " Structure file format : DISCUS (converting B -> Uij) \n"; - Atom::streamformat = Atom::DISCUS; - } - else - { - *pout << " Structure file format : PDFFIT\n"; - Atom::streamformat = Atom::PDFFIT; - } - - read_atoms(fstruct); - // update atom_types - atom_types.clear(); - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - if (!count(atom_types.begin(), atom_types.end(), ai->atom_type)) - { - atom_types.push_back(ai->atom_type); - } - } - - lattice(); - - tot = icc[0]*icc[1]*icc[2]*ncatoms; - - if (tot != natoms) - { - throw structureError("Inconsistent # of atoms in structure"); - } -} - - -/****************************************************************** - This subroutine reads the header of a structure file - Wed Oct 12 2005 - CLF - Changed ifstream to istream to accommodate stringstreams - as well. -********************************************************************/ - -void Phase::read_header(istream &fstruct, bool &ldiscus) -{ - string ier_msg; - string befehl, line; - - - // initialize format type to discuss format - ldiscus = true; - - /* parse structure file header and fill phase variables */ - - while (getline(fstruct, line)) - { - istringstream sline(line); - string action; - - // try to read a command from structure file - // if an error occurs, an exception will be caught - try{ - sline >> befehl; - - // get out if we get to atom positions - if (befehl == "atoms") break; - - // skip comments, i.e., when befehl starts with '#' - else if (befehl.find('#') == 0) continue; - - // format - else if (befehl == "format") - { - string format; - sline >> format; - ldiscus = (format != "pdffit"); - } - - // scale factor (PDFFIT) - else if (befehl == "scale") - { - action = "Reading scale factor"; - this->pscale = dget(sline); - this->dpscale = 0.0; - if (!sline) - { - throw structureError(action); - } - } - - // peak sharpening factors (PDFFIT) - else if (befehl == "sharp") - { - action = "reading sharpening parameters"; - double v0 = 0.0, v1 = 0.0, v2 = 0.0, v3 = 0.0; - // at least 3-parameters must be read without error - v0 = dget(sline); - v1 = dget(sline); - v2 = dget(sline); - // we have new format if we can read the 4th parameter - try { - v3 = dget(sline); - delta2 = v0; - delta1 = v1; - sratio = v2; - rcut = v3; - } - // if reading of 4th parameter fails, assume old format - catch(vgetException) { - delta2 = v0; - delta1 = 0.0; - sratio = v1; - rcut = v2; - } - ddelta2 = 0.0; - dsratio = 0.0; - ddelta1 = 0.0; - } - - // space group symbol (only to save it later for DISCUS use) - else if (befehl == "spcgr") - { - sline >> spcgr; - } - - // particle shape corrections - else if (befehl == "shape") - { - action = "reading particle shape correction data"; - string shapedata; - getline(sline, shapedata); - substitute(shapedata, ",", " "); - istringstream shapestream(shapedata); - string w; - shapestream >> w; - if (w == "sphere") - { - this->spdiameter = dget(shapestream); - } - else if (w == "stepcut") - { - this->stepcut = dget(shapestream); - } - else - { - ostringstream emsg; - emsg << " Unknown shape correction: " << w; - throw structureError(emsg.str()); - } - } - - // title / name for structure - else if (befehl == "title") - { - getline(sline, name); - // getline keeps leading whitespace - name = lstrip(name); - } - - // cell constants - else if (befehl == "cell") - { - action = "reading unit cell parameters"; - a0[0] = dget(sline); - a0[1] = dget(sline); - a0[2] = dget(sline); - win[0] = dget(sline); - win[1] = dget(sline); - win[2] = dget(sline); - } - - // standard deviation of cell constants - else if (befehl == "dcell") - { - action = "reading standard deviation of unit cell parameters"; - da0[0] = dget(sline); - da0[1] = dget(sline); - da0[2] = dget(sline); - dwin[0] = dget(sline); - dwin[1] = dget(sline); - dwin[2] = dget(sline); - } - - // crystal dimensions and number of atoms per unit cell 'ncell' - else if (befehl == "ncell") - { - action = "reading # atoms/unit cell"; - icc[0] = iget(sline); - icc[1] = iget(sline); - icc[2] = iget(sline); - ncatoms = iget(sline); - } - - // show warning message otherwise - else - { - *pout << " ****WARN**** Unknown keyword: " << - befehl << " (ignored) ****\n"; - } - } // end of try - // catch vget-exception and throw the specific exception - catch(vgetException e) { throw structureError(action+e.GetMsg()); } - } -} - -void Phase::read_atoms(istream& fstruct) -{ - Atom a; - while (fstruct >> a) - { - reassign_atom_type(&a); - this->atom.push_back(a); - natoms++; - } - return; -} - - -void Phase::reassign_atom_type(Atom* ap) -{ - LocalPeriodicTable* lpt = getPeriodicTable(); - const string& smbl = ap->atom_type->symbol; - ap->atom_type = lpt->symbol(smbl); -} - - - -/******************************************* -c------ - Save structure for given phase - Thu Oct 13 2005 - CLF - Changed code to return a string of the - saved file. Actually saving the file is - optional. -*******************************************/ -string PdfFit::show_struct(int ip) -{ - string filestring = save_struct(ip,""); - return filestring; -} - -string PdfFit::save_struct(int ip, string strucfile) -{ - - stringstream outfilestream; - - if ( (ip < 1) || (ip > nphase) ) - { - throw unassignedError("phase does not exist"); - } - else - { - bool ldiscus=false; - ofstream fout; - - if (!strucfile.empty()) - { - if (ldiscus) - *pout << " Saving structure (DISCUS format) phase " << ip - << " to file : " << strucfile << endl; - else - *pout << " Saving structure phase " << ip << " to file : " - << strucfile << endl; - - phase[ip-1]->save_struct(outfilestream); - - fout.open(strucfile.c_str()); - if (!fout) { - throw IOError("cannot create output file"); - } - fout << outfilestream.str(); - fout.close(); - } - else - { - phase[ip-1]->save_struct(outfilestream); - } - } - - return outfilestream.str(); -} - -/*************************************************************** -c This subroutine saves the structure and/or the unit cell -c onto a file. The format uses keyword description. -****************************************************************/ -template void Phase::save_struct(Stream &fout) -{ - const double fac = 8.0*M_PI*M_PI /3.0; - bool ldis=false; - - // -- Write new type of structure file - - fout << "title " << name << endl; - - fout << setprecision(6) << fixed; - - if (!ldis) - { - fout << "format pdffit" << endl; - fout << "scale " << setw(9) << pscale << endl; - fout << "sharp " << setw(9) << delta2 << ", " << setw(9) << delta1 << ", " - << setw(9) << sratio << ", " << setw(9) << rcut << endl; - } - - fout << "spcgr " << spcgr << endl; - - if (spdiameter > 0.0) - { - fout << "shape sphere, " << spdiameter << endl; - } - - if (stepcut > 0.0) - { - fout << "shape stepcut, " << stepcut << endl; - } - - fout << "cell "; - for (int i=0; i<3; i++) - fout << setw(9) << a0[i] << ", "; - - for (int i=0; i<3; i++) - { - fout << setw(9) << win[i]; - if (i!=2) - fout << ", "; - else - fout << endl; - } - - if (!ldis) - { - fout << "dcell "; - for (int i=0; i<3; i++) - fout << setw(9) << da0[i] << ", "; - - for (int i=0; i<3; i++) - { - fout << setw(9) << dwin[i]; - if (i!=2) - fout << ", "; - else - fout << endl; - } - } - - fout << "ncell "; - for (int i=0; i<3; i++) - fout << setw(9) << icc[i] << ", "; - fout << setw(9) << ncatoms << endl; - - fout << "atoms" << endl; - for (VAIT ai = atom.begin(); ai != atom.end(); ++ai) - { - - if (ldis) - { - double dw = fac*(ai->u[1]+ai->u[2]+ai->u[3]); - fout << setw(4) << left << ai->atom_type->symbol; - fout << right << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->pos[i]; - fout << ' ' << setw(12) << dw << endl; - } - else - { - fout << setw(4) << left << ai->atom_type->symbol; - fout << right << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->pos[i]; - fout << ' ' << setw(12) << setprecision(4) << ai->occ << endl; - - fout << " "; - fout << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->dpos[i]; - fout << ' ' << setw(12) << setprecision(4) << ai->docc << endl; - - fout << " "; - fout << setprecision(8); - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->u[i]; - fout << endl; - - fout << " "; - for (int i=0; i<3; i++) fout << ' ' << setw(17) << ai->du[i]; - fout << endl; - - fout << " "; - for (int i=3; i<6; i++) fout << ' ' << setw(17) << ai->u[i]; - fout << endl; - - fout << " "; - for (int i=3; i<6; i++) fout << ' ' << setw(17) << ai->du[i]; - fout << endl; - } - } -} - - -/*************************************** -c Calculate bond angles with errors -****************************************/ -pair PdfFit::bond_angle(int ia, int ja, int ka) -{ - if (!curphase) - { - throw unassignedError("Must read structure first"); - } - return curphase->bond_angle(ia, ja, ka); -} - -/*********************************************************************** -* shift to equivalent lattice position that is nearest to the origin -***********************************************************************/ -void Phase::make_nearest(double xyz[3]) -{ - // first shift to the first unit cell - for (int i = 0; i !=3; ++i) - { - // MS compatibility - use fmod instead of remainder - xyz[i] = fmod(xyz[i], icc[i]); - } - // that is all in orthogonal cell or if we get to the origin - if ( (xyz[0] == 0.0 && xyz[1] == 0.0 && xyz[2] == 0.0) || - (win[0] == 90.0 && win[1] == 90.0 && win[2] == 90.0) ) - { - return; - } - // otherwise we need to check all cells around - // first, let us shift to octant with xyz[i] <= 0.0 - for (int i = 0; i != 3; ++i) - { - if (xyz[i] > 0.0) xyz[i] -= icc[i]; - } - double nearest[3] = { xyz[0], xyz[1], xyz[2] }; - double mindsquare = skalpro(nearest, nearest); - double test[3]; - for (test[0] = xyz[0]; test[0] < icc[0]; test[0] += icc[0]) - { - for (test[1] = xyz[1]; test[1] < icc[1]; test[1] += icc[1]) - { - for (test[2] = xyz[2]; test[2] < icc[2]; test[2] += icc[2]) - { - double dsquare = skalpro(test,test); - if (dsquare < mindsquare) - { - copy(test, test+3, nearest); - dsquare = mindsquare; - } - } - } - } - copy(nearest, nearest+3, xyz); -} - -pair Phase::bond_angle(int ia, int ja, int ka) -{ - double x[3], y[3], dx[3], dy[3], xx, yy, xy, dxx, dyy, dxy, arg, darg, ang, dang; - - - if ( (ia < 1) || (ia > natoms) || (ja < 1) || (ja > natoms) - || (ka < 1) || (ka > natoms)) - { - stringstream eout; - eout << "Incorrect atom number(s): " << ia << ", " << ja << ", " << ka; - throw ValueError(eout.str()); - } - if ( ia == ja || ia == ka || ja == ka ) - { - stringstream eout; - eout << "All atoms must be different: " << ia << ", "; - eout << ja << ", " << ka; - throw ValueError(eout.str()); - } - - Atom& ai = atom[ia - 1]; - Atom& aj = atom[ja - 1]; - Atom& ak = atom[ka - 1]; - - for (int i=0; i<3; i++) - { - x[i] = aj.pos[i] - ai.pos[i]; - y[i] = aj.pos[i] - ak.pos[i]; - dx[i] = aj.dpos[i] + ai.dpos[i]; - dy[i] = aj.dpos[i] + ak.dpos[i]; - } - - make_nearest(x); - make_nearest(y); - xx = sqrt(skalpro(x,x)); - yy = sqrt(skalpro(y,y)); - xy = skalpro(x,y); - - dxx = 0.5/xx*dskalpro(x,x,dx,dx); - dyy = 0.5/yy*dskalpro(y,y,dy,dy); - dxy = dskalpro(x,y,dx,dy); - arg = xy/(xx*yy); - ang = acosd(arg); - darg = (1.0/(xx*yy)*dxy + arg/xx*dxx +arg/yy*dyy); - if (arg != 1.0) - dang = fabs(1.0/sqrt(1.0-arg*arg)/rad*darg); - else - dang = 0.0; - - pair rv(ang, dang); - - return rv; -} - -/*************************************** -c Calculate bond lengths with errors -****************************************/ -PairDistance PdfFit::bond_length_atoms(int ia, int ja) -{ - if (!curphase) - { - throw unassignedError("Must read structure first"); - } - return curphase->bond_length_atoms(ia, ja); -} - -PairDistance Phase::bond_length_atoms(int ia, int ja) -{ - double d[3], dd[3], dist, ddist; - - // -- Simple distance between given atoms - - if ( (ia < 1) || (ia > natoms) || (ja < 1) || (ja > natoms) ) - { - - stringstream eout; - eout << "Incorrect atom number(s): " << ia << ", " << ja; - throw ValueError(eout.str()); - } - - Atom& ai = atom[ia-1]; - Atom& aj = atom[ja-1]; - - for (int jj=0; jj<3; jj++) - { - d[jj] = ai.pos[jj] - aj.pos[jj]; - dd[jj] = ai.dpos[jj] + aj.dpos[jj]; - } - make_nearest(d); - dist = sqrt(skalpro(d,d)); - ddist = (dist > 0) ? 0.5/dist * dskalpro(d,d,dd,dd) : 0.0; - - PairDistance pd; - pd.dij = dist; - pd.ddij = ddist; - pd.i = ia; - pd.j = ja; - - return pd; -} - - -vector PdfFit::bond_length_types(string symi, string symj, - double bmin, double bmax) -{ - if (!curphase) - { - throw unassignedError("Must read structure first"); - } - return curphase->bond_length_types(symi, symj, bmin, bmax); -} - -vector Phase::bond_length_types(string symi, string symj, - double bmin, double bmax) -{ - double d[3], dd[3], dist, ddist; - set iselection, jselection; - iselection = selectAtomsOf(symi); - jselection = selectAtomsOf(symj); - - // ---- Get all bonds in specified range - - // calculate range for PointsInSphere sequencer - // (negative rsphmin is no problem) - double buffzone = circum_diameter(); - double rsphmin = bmin - buffzone; - double rsphmax = bmax + buffzone; - PointsInSphere sph( rsphmin, rsphmax, a0[0]*icc[0], - a0[1]*icc[1], a0[2]*icc[2], - win[0], win[1], win[2] ); - - // -- Loop over all atoms within the crystal - vector rv; - set::iterator ia, ja; - for (ia = iselection.begin(); ia != iselection.end(); ++ia) - { - for (ja = jselection.begin(); ja != jselection.end(); ++ja) - { - for (sph.rewind(); !sph.finished(); sph.next()) - { - for (int jj=0; jj<3; jj++) - { - d[jj] = atom[*ia].pos[jj] - atom[*ja].pos[jj] - - sph.mno[jj]*icc[jj]; - dd[jj] = atom[*ia].dpos[jj] + atom[*ja].dpos[jj]; - } - dist = sqrt(skalpro(d,d)); - if ( (dist >= bmin) && (dist <= bmax) ) - { - ddist = (dist > 0) ? 0.5/dist * dskalpro(d,d,dd,dd) : 0.0; - PairDistance pd; - pd.dij = dist; - pd.ddij = ddist; - pd.i = *ia + 1; - pd.j = *ja + 1; - rv.push_back(pd); - } - } - } - } - stable_sort(rv.begin(), rv.end()); - return rv; -} - -set Phase::selectAtomsOf(string symbol) -{ - set selection; - if (toupper(symbol) == "ALL") - { - for (size_t i = 0; i != size_t(natoms); ++i) selection.insert(i); - return selection; - } - // here we need to find AtomType - LocalPeriodicTable* lpt = getPeriodicTable(); - const AtomType* atp; - try - { - atp = lpt->lookup(symbol); - } - catch (ValueError e) - { - ostringstream emsg; - emsg << "Incorrect atom type '" << symbol << "'"; - throw ValueError(emsg.str()); - } - for (size_t i = 0; i != size_t(natoms); ++i) - { - if (atom[i].atom_type == atp) selection.insert(i); - } - return selection; -} - -// End of file diff --git a/src/extensions/libpdffit2/support_msvc9.h b/src/extensions/libpdffit2/support_msvc9.h deleted file mode 100644 index cb4bbf70..00000000 --- a/src/extensions/libpdffit2/support_msvc9.h +++ /dev/null @@ -1,13 +0,0 @@ -/*********************************************************************** -* Python 2.7 needs MSVC 9.0 which does not have unique_ptr. -* Work around by substituting auto_ptr instead. -***********************************************************************/ - -#ifdef _MSC_VER - -// workarounds for MSVC 9.0 -------------------------------------------- -#if _MSC_VER <= 1500 -#define unique_ptr auto_ptr -#endif - -#endif // _MSC_VER diff --git a/src/extensions/libpdffit2/tests/Makefile b/src/extensions/libpdffit2/tests/Makefile deleted file mode 100644 index f6bfe566..00000000 --- a/src/extensions/libpdffit2/tests/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -######################################################################## -# Targets: alltests unittests -# -# Comments: This Makefile is for building and running C++ unit tests -# on the libpdffit2 sources. Intended for developers, not for the end -# users who just want to build pdffit2 from sources. -# -######################################################################## - - -# compiler options -CPPFLAGS += -I../ $(shell cppunit-config --cflags) -LDLIBS += $(shell cppunit-config --libs) - - -# default target -all: unittest - - -# build unit test driver -alltests: alltests.cc \ - TestPointsInSphere.cc ../PointsInSphere.cc - - -# execute unit tests -unittest: alltests - ./alltests - - -# clean up any generated files -clean: - rm -f alltests diff --git a/src/extensions/libpdffit2/tests/TestPointsInSphere.cc b/src/extensions/libpdffit2/tests/TestPointsInSphere.cc deleted file mode 100644 index b82fcb31..00000000 --- a/src/extensions/libpdffit2/tests/TestPointsInSphere.cc +++ /dev/null @@ -1,228 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Unit tests for PointsInSphere module -* -* Comments: -* -***********************************************************************/ - -#include -#include -#include -#include - -#include "PointsInSphere.h" - -using namespace std; -using namespace NS_POINTSINSPHERE; - -namespace { - -const double eps = 1.0e-12; - -struct vidxgroup -{ - double vijk[4]; - vidxgroup(double v, int* ijk) - { - vijk[0] = v; - for (size_t i = 0; i != 3; ++i) { vijk[i+1] = ijk[i]; } - } - vidxgroup(double v, int i, int j, int k) - { - vijk[0] = v; vijk[1] = i; vijk[2] = j; vijk[3] = k; - } -}; - -bool operator<(const vidxgroup &x, const vidxgroup &y) -{ - return (x.vijk[0] < y.vijk[0] - eps) || - lexicographical_compare(x.vijk+1, x.vijk+4, y.vijk+1, y.vijk+4); -} - -bool operator==(const vidxgroup &x, const vidxgroup &y) -{ - bool eq = (fabs(x.vijk[0] - y.vijk[0]) < eps) && - equal(x.vijk+1, x.vijk+4, y.vijk+1); - return eq; -} - -ostream& operator<<(ostream &s, const vidxgroup &x) -{ - return s << "<" << x.vijk[0] << ";" << int(x.vijk[1]) - << ',' << int(x.vijk[2]) << ',' << int(x.vijk[3]) << '>'; -} - -} // namespace - -//////////////////////////////////////////////////////////////////////// -// TestPointsInSphere -//////////////////////////////////////////////////////////////////////// - -class TestPointsInSphere : public CppUnit::TestFixture -{ - - CPPUNIT_TEST_SUITE(TestPointsInSphere); - CPPUNIT_TEST(test_Cubic); - CPPUNIT_TEST(test_Orthorombic); - CPPUNIT_TEST(test_Hexagonal); - CPPUNIT_TEST(test_FCC); - CPPUNIT_TEST_SUITE_END(); - -private: - - LatticeParameters* latpar; - -public: - - void setUp() - { - latpar = new LatticeParameters(1, 1, 1, 90, 90, 90); - } - - void tearDown() - { - delete latpar; - } - -private: - - int count(double Rmin, double Rmax) - { - int c = 0; - for ( PointsInSphere sph(Rmin, Rmax, *latpar); - not sph.finished(); sph.next(), ++c ) - { } - return c; - } - - vector sortedPoints(double Rmin, double Rmax) - { - vector ridx; - for ( PointsInSphere sph(Rmin, Rmax, *latpar); - not sph.finished(); sph.next() ) - { - ridx.push_back(vidxgroup(sph.r(), sph.mno)); - } - sort(ridx.begin(), ridx.end()); - return ridx; - } - -public: - - void test_Cubic() - { - latpar->a = latpar->b = latpar->c = 1.0; - latpar->alpha = latpar->beta = latpar->gamma = 90.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(0, count(0.0, 0.0)); - CPPUNIT_ASSERT_EQUAL(0, count(eps, 0.5)); - CPPUNIT_ASSERT_EQUAL(0, count(1.0 + eps, 1.1)); - CPPUNIT_ASSERT_EQUAL(1, count(0.0, eps)); - CPPUNIT_ASSERT_EQUAL(7, count(0.0, 1 + eps)); - CPPUNIT_ASSERT_EQUAL(19, count(0.0, sqrt(2.0) + eps)); - CPPUNIT_ASSERT_EQUAL(12, count(1.0 + eps, sqrt(2.0) + eps)); - } - - void test_Orthorombic() - { - latpar->a = 1.0; latpar->b = 2.0; latpar->c = 3.0; - latpar->alpha = latpar->beta = latpar->gamma = 90.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(3, count(0.0, 1.1)); - CPPUNIT_ASSERT_EQUAL(4, count(1.9, 2.1)); - vidxgroup ep[] = { - vidxgroup(0, 0, 0, 0), - vidxgroup(1, -1, 0, 0), - vidxgroup(1, 1, 0, 0), - vidxgroup(2, -2, 0, 0), - vidxgroup(2, 0, -1, 0), - vidxgroup(2, 0, 1, 0), - vidxgroup(2, 2, 0, 0), - vidxgroup(sqrt(5.0), -1, -1, 0), - vidxgroup(sqrt(5.0), -1, 1, 0), - vidxgroup(sqrt(5.0), 1, -1, 0), - vidxgroup(sqrt(5.0), 1, 1, 0), - vidxgroup(sqrt(8.0), -2, -1, 0), - vidxgroup(sqrt(8.0), -2, 1, 0), - vidxgroup(sqrt(8.0), 2, -1, 0), - vidxgroup(sqrt(8.0), 2, 1, 0), - vidxgroup(3, -3, 0, 0), - vidxgroup(3, 0, 0, -1), - vidxgroup(3, 0, 0, 1), - vidxgroup(3, 3, 0, 0), - }; - vector exp_pts(ep, ep + sizeof(ep)/sizeof(vidxgroup)); - vector act_pts = sortedPoints(0.0, 3.0+eps); - CPPUNIT_ASSERT_EQUAL(exp_pts.size(), act_pts.size()); - for (size_t i = 0; i != exp_pts.size(); ++i) - { - CPPUNIT_ASSERT_EQUAL(exp_pts[i], act_pts[i]); - } - } - - void test_Hexagonal() - { - latpar->a = 1.0; latpar->b = 1.0; latpar->c = 2.0; - latpar->alpha = latpar->beta = 90.0; latpar->gamma = 120.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(7, count(0.0, 1+eps)); - vidxgroup ep[] = { - vidxgroup(0, 0, 0, 0), - vidxgroup(1, -1, -1, 0), - vidxgroup(1, -1, 0, 0), - vidxgroup(1, 0, -1, 0), - vidxgroup(1, 0, 1, 0), - vidxgroup(1, 1, 0, 0), - vidxgroup(1, 1, 1, 0), - vidxgroup(sqrt(3.0), -2, -1, 0), - vidxgroup(sqrt(3.0), -1, -2, 0), - vidxgroup(sqrt(3.0), -1, 1, 0), - vidxgroup(sqrt(3.0), 1, -1, 0), - vidxgroup(sqrt(3.0), 1, 2, 0), - vidxgroup(sqrt(3.0), 2, 1, 0), - vidxgroup(2, -2, -2, 0), - vidxgroup(2, -2, 0, 0), - vidxgroup(2, 0, -2, 0), - vidxgroup(2, 0, 0, -1), - vidxgroup(2, 0, 0, 1), - vidxgroup(2, 0, 2, 0), - vidxgroup(2, 2, 0, 0), - vidxgroup(2, 2, 2, 0), - }; - vector exp_pts(ep, ep + sizeof(ep)/sizeof(vidxgroup)); - vector act_pts = sortedPoints(0.0, 2.0+eps); - CPPUNIT_ASSERT_EQUAL(exp_pts.size(), act_pts.size()); - for (size_t i = 0; i != exp_pts.size(); ++i) - { - CPPUNIT_ASSERT_EQUAL(exp_pts[i], act_pts[i]); - } - } - - void test_FCC() - { - latpar->a = latpar->b = latpar->c = sqrt(0.5); - latpar->alpha = latpar->beta = latpar->gamma = 60.0; - latpar->update(); - CPPUNIT_ASSERT_EQUAL(13, count(0.0, sqrt(0.5)+eps)); - CPPUNIT_ASSERT_EQUAL(19, count(0.0, 1.0+eps)); - } - -}; - -// Registers the fixture into the 'registry' -CPPUNIT_TEST_SUITE_REGISTRATION(TestPointsInSphere); - -// End of file diff --git a/src/extensions/libpdffit2/tests/alltests.cc b/src/extensions/libpdffit2/tests/alltests.cc deleted file mode 100644 index 318cb4b3..00000000 --- a/src/extensions/libpdffit2/tests/alltests.cc +++ /dev/null @@ -1,46 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Unit tests driver -* -***********************************************************************/ - -#include -#include -#include -#include -#include - -using namespace std; -using namespace CppUnit; - -int main() -{ - // Get the top level suite from the registry - Test *suite = TestFactoryRegistry::getRegistry().makeTest(); - - // Adds the test to the list of test to run - TextUi::TestRunner runner; - runner.addTest( suite ); - - // Change the default outputter to a compiler error format outputter - runner.setOutputter( new CompilerOutputter(&runner.result(), cerr) ); - // Run the tests. - bool wasSucessful = runner.run(); - - // Return error code 1 if the one of test failed. - return wasSucessful ? EXIT_SUCCESS : EXIT_FAILURE; -} - -// End of file diff --git a/src/extensions/pdffit2module/PyFileStreambuf.h b/src/extensions/pdffit2module/PyFileStreambuf.h deleted file mode 100644 index cc8588bc..00000000 --- a/src/extensions/pdffit2module/PyFileStreambuf.h +++ /dev/null @@ -1,102 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2007 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Pavol Juhas -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* class PyFileStreambuf -* -* Comments: PyFileStreambuf is a C++ streambuf which writes to a python -* file-like object. The python file can be changed anytime by -* calling the redirect() method. -* -* Examples: // redirect std::cout -* std::cout.rdbuf( PyFileStreambuf(PyObject* python_file) ); -* -***********************************************************************/ - -#ifndef PYFILESTREAMBUF_H_INCLUDED -#define PYFILESTREAMBUF_H_INCLUDED -#define PY_SSIZE_T_CLEAN - -#include -#include - -// MS compatibility fix -#include - -class PyFileStreambuf : public std::streambuf -{ - private: - - // Data members - PyObject* py_file; - - public: - - // Constructor - PyFileStreambuf(PyObject* f) : py_file(f) - { - Py_INCREF(py_file); - } - - // Destructor - ~PyFileStreambuf() - { - Py_DECREF(py_file); - } - - // Methods - PyObject* redirect(PyObject* f) - { - Py_INCREF(f); - Py_DECREF(py_file); - py_file = f; - return py_file; - } - - protected: - - virtual int_type overflow( int_type c) - { - char ch = static_cast(c); - PyObject* py_str = PyUnicode_FromStringAndSize(&ch, 1); - if (!py_str) { return traits_type::eof(); } - PyObject* rv = PyObject_CallMethod(py_file, "write", "O", py_str); - Py_DECREF(py_str); - if (rv) { Py_DECREF(rv); } - return c; - } - - virtual std::streamsize xsputn(const char_type* s, std::streamsize n) - { - PyObject* py_str = PyUnicode_DecodeUTF8(s, n, "replace"); - if (!py_str) { return 0; } - PyObject* rv = PyObject_CallMethod(py_file, "write", "O", py_str); - Py_DECREF(py_str); - if (rv) { Py_DECREF(rv); } - return n; - } - - virtual int sync() - { - if (PyObject_HasAttrString(py_file, "flush")) - { - PyObject* rv; - rv = PyObject_CallMethod(py_file, "flush", NULL); - if (rv) { Py_DECREF(rv); } - } - return 0; - } - -}; - -#endif // PYFILESTREAMBUF_H_INCLUDED diff --git a/src/extensions/pdffit2module/bindings.cc b/src/extensions/pdffit2module/bindings.cc deleted file mode 100644 index 568e1dd1..00000000 --- a/src/extensions/pdffit2module/bindings.cc +++ /dev/null @@ -1,341 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Method table for python module bindings. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include - -#include "bindings.h" -#include "misc.h" - -// the method table -struct PyMethodDef pypdffit2_methods[] = { - - //copyright - {pypdffit2_copyright__name__, pypdffit2_copyright, - METH_VARARGS, pypdffit2_copyright__doc__}, - - //create - {pypdffit2_create__name__, pypdffit2_create, - METH_VARARGS, pypdffit2_create__doc__}, - - //read_struct - {pypdffit2_read_struct__name__, pypdffit2_read_struct, - METH_VARARGS, pypdffit2_read_struct__doc__}, - - //read_struct_string - {pypdffit2_read_struct_string__name__, pypdffit2_read_struct_string, - METH_VARARGS, pypdffit2_read_struct_string__doc__}, - - //read_data - {pypdffit2_read_data__name__, pypdffit2_read_data, - METH_VARARGS, pypdffit2_read_data__doc__}, - - //read_data_string - {pypdffit2_read_data_string__name__, pypdffit2_read_data_string, - METH_VARARGS, pypdffit2_read_data_string__doc__}, - - //read_data_arrays - {pypdffit2_read_data_arrays__name__, pypdffit2_read_data_arrays, - METH_VARARGS, pypdffit2_read_data_arrays__doc__}, - - //pdfrange - {pypdffit2_pdfrange__name__, pypdffit2_pdfrange, - METH_VARARGS, pypdffit2_pdfrange__doc__}, - - //reset - {pypdffit2_reset__name__, pypdffit2_reset, - METH_VARARGS, pypdffit2_reset__doc__}, - - //alloc - {pypdffit2_alloc__name__, pypdffit2_alloc, - METH_VARARGS, pypdffit2_alloc__doc__}, - - //calc - {pypdffit2_calc__name__, pypdffit2_calc, - METH_VARARGS, pypdffit2_calc__doc__}, - - //refine - {pypdffit2_refine__name__, pypdffit2_refine, - METH_VARARGS, pypdffit2_refine__doc__}, - - //refine_step - {pypdffit2_refine_step__name__, pypdffit2_refine_step, - METH_VARARGS, pypdffit2_refine_step__doc__}, - - //save_pdf - {pypdffit2_save_pdf__name__, pypdffit2_save_pdf, - METH_VARARGS, pypdffit2_save_pdf__doc__}, - - //save_dif - {pypdffit2_save_dif__name__, pypdffit2_save_dif, - METH_VARARGS, pypdffit2_save_dif__doc__}, - - //save_res - {pypdffit2_save_res__name__, pypdffit2_save_res, - METH_VARARGS, pypdffit2_save_res__doc__}, - - //save_struct - {pypdffit2_save_struct__name__, pypdffit2_save_struct, - METH_VARARGS, pypdffit2_save_struct__doc__}, - - //show_struct - {pypdffit2_show_struct__name__, pypdffit2_show_struct, - METH_VARARGS, pypdffit2_show_struct__doc__}, - - //constrain_int - {pypdffit2_constrain_int__name__, pypdffit2_constrain_int, - METH_VARARGS, pypdffit2_constrain_int__doc__}, - - //constrain_str - {pypdffit2_constrain_str__name__, pypdffit2_constrain_str, - METH_VARARGS, pypdffit2_constrain_str__doc__}, - - //setpar_dbl - {pypdffit2_setpar_dbl__name__, pypdffit2_setpar_dbl, - METH_VARARGS, pypdffit2_setpar_dbl__doc__}, - - //setpar_RV - {pypdffit2_setpar_RV__name__, pypdffit2_setpar_RV, - METH_VARARGS, pypdffit2_setpar_RV__doc__}, - - //setvar - {pypdffit2_setvar__name__, pypdffit2_setvar, - METH_VARARGS, pypdffit2_setvar__doc__}, - - //getvar - {pypdffit2_getvar__name__, pypdffit2_getvar, - METH_VARARGS, pypdffit2_getvar__doc__}, - - //getR - {pypdffit2_getR__name__, pypdffit2_getR, - METH_VARARGS, pypdffit2_getR__doc__}, - - //getpdf_fit - {pypdffit2_getpdf_fit__name__, pypdffit2_getpdf_fit, - METH_VARARGS, pypdffit2_getpdf_fit__doc__}, - - //getpdf_obs - {pypdffit2_getpdf_obs__name__, pypdffit2_getpdf_obs, - METH_VARARGS, pypdffit2_getpdf_obs__doc__}, - - //getpdf_diff - {pypdffit2_getpdf_diff__name__, pypdffit2_getpdf_diff, - METH_VARARGS, pypdffit2_getpdf_diff__doc__}, - - //getcrw - {pypdffit2_getcrw__name__, pypdffit2_getcrw, - METH_VARARGS, pypdffit2_getcrw__doc__}, - - //getrw - {pypdffit2_getrw__name__, pypdffit2_getrw, - METH_VARARGS, pypdffit2_getrw__doc__}, - - //getpar - {pypdffit2_getpar__name__, pypdffit2_getpar, - METH_VARARGS, pypdffit2_getpar__doc__}, - - //fixpar - {pypdffit2_fixpar__name__, pypdffit2_fixpar, - METH_VARARGS, pypdffit2_fixpar__doc__}, - - //freepar - {pypdffit2_freepar__name__, pypdffit2_freepar, - METH_VARARGS, pypdffit2_freepar__doc__}, - - //setphase - {pypdffit2_setphase__name__, pypdffit2_setphase, - METH_VARARGS, pypdffit2_setphase__doc__}, - - //setdata - {pypdffit2_setdata__name__, pypdffit2_setdata, - METH_VARARGS, pypdffit2_setdata__doc__}, - - //psel - {pypdffit2_psel__name__, pypdffit2_psel, - METH_VARARGS, pypdffit2_psel__doc__}, - - //pdesel - {pypdffit2_pdesel__name__, pypdffit2_pdesel, - METH_VARARGS, pypdffit2_pdesel__doc__}, - - //selectAtomType - {pypdffit2_selectAtomType__name__, pypdffit2_selectAtomType, - METH_VARARGS, pypdffit2_selectAtomType__doc__}, - - //selectAtomIndex - {pypdffit2_selectAtomIndex__name__, pypdffit2_selectAtomIndex, - METH_VARARGS, pypdffit2_selectAtomIndex__doc__}, - - //selectAll - {pypdffit2_selectAll__name__, pypdffit2_selectAll, - METH_VARARGS, pypdffit2_selectAll__doc__}, - - //selectNone - {pypdffit2_selectNone__name__, pypdffit2_selectNone, - METH_VARARGS, pypdffit2_selectNone__doc__}, - - //bond_angle - {pypdffit2_bond_angle__name__, pypdffit2_bond_angle, - METH_VARARGS, pypdffit2_bond_angle__doc__}, - - //bond_length_atoms - {pypdffit2_bond_length_atoms__name__, pypdffit2_bond_length_atoms, - METH_VARARGS, pypdffit2_bond_length_atoms__doc__}, - - //bond_length_types - {pypdffit2_bond_length_types__name__, pypdffit2_bond_length_types, - METH_VARARGS, pypdffit2_bond_length_types__doc__}, - - //get_scat_string - {pypdffit2_get_scat_string__name__, pypdffit2_get_scat_string, - METH_VARARGS, pypdffit2_get_scat_string__doc__}, - - //get_scat - {pypdffit2_get_scat__name__, pypdffit2_get_scat, - METH_VARARGS, pypdffit2_get_scat__doc__}, - - //set_scat - {pypdffit2_set_scat__name__, pypdffit2_set_scat, - METH_VARARGS, pypdffit2_set_scat__doc__}, - - //reset_scat - {pypdffit2_reset_scat__name__, pypdffit2_reset_scat, - METH_VARARGS, pypdffit2_reset_scat__doc__}, - - //lat - {pypdffit2_lat__name__, pypdffit2_lat, - METH_VARARGS, pypdffit2_lat__doc__}, - - //x - {pypdffit2_x__name__, pypdffit2_x, - METH_VARARGS, pypdffit2_x__doc__}, - - //y - {pypdffit2_y__name__, pypdffit2_y, - METH_VARARGS, pypdffit2_y__doc__}, - - //z - {pypdffit2_z__name__, pypdffit2_z, - METH_VARARGS, pypdffit2_z__doc__}, - - //u11 - {pypdffit2_u11__name__, pypdffit2_u11, - METH_VARARGS, pypdffit2_u11__doc__}, - - //u22 - {pypdffit2_u22__name__, pypdffit2_u22, - METH_VARARGS, pypdffit2_u22__doc__}, - - //u33 - {pypdffit2_u33__name__, pypdffit2_u33, - METH_VARARGS, pypdffit2_u33__doc__}, - - //u12 - {pypdffit2_u12__name__, pypdffit2_u12, - METH_VARARGS, pypdffit2_u12__doc__}, - - //u13 - {pypdffit2_u13__name__, pypdffit2_u13, - METH_VARARGS, pypdffit2_u13__doc__}, - - //u23 - {pypdffit2_u23__name__, pypdffit2_u23, - METH_VARARGS, pypdffit2_u23__doc__}, - - //occ - {pypdffit2_occ__name__, pypdffit2_occ, - METH_VARARGS, pypdffit2_occ__doc__}, - - //pscale - {pypdffit2_pscale__name__, pypdffit2_pscale, - METH_VARARGS, pypdffit2_pscale__doc__}, - - //spdiameter - {pypdffit2_spdiameter__name__, pypdffit2_spdiameter, - METH_VARARGS, pypdffit2_spdiameter__doc__}, - - //stepcut - {pypdffit2_stepcut__name__, pypdffit2_stepcut, - METH_VARARGS, pypdffit2_stepcut__doc__}, - - //sratio - {pypdffit2_sratio__name__, pypdffit2_sratio, - METH_VARARGS, pypdffit2_sratio__doc__}, - - //delta2 - {pypdffit2_delta2__name__, pypdffit2_delta2, - METH_VARARGS, pypdffit2_delta2__doc__}, - - //delta1 - {pypdffit2_delta1__name__, pypdffit2_delta1, - METH_VARARGS, pypdffit2_delta1__doc__}, - - //dscale - {pypdffit2_dscale__name__, pypdffit2_dscale, - METH_VARARGS, pypdffit2_dscale__doc__}, - - //qdamp - {pypdffit2_qdamp__name__, pypdffit2_qdamp, - METH_VARARGS, pypdffit2_qdamp__doc__}, - - //qbroad - {pypdffit2_qbroad__name__, pypdffit2_qbroad, - METH_VARARGS, pypdffit2_qbroad__doc__}, - - //rcut - {pypdffit2_rcut__name__, pypdffit2_rcut, - METH_VARARGS, pypdffit2_rcut__doc__}, - - //get_atoms - {pypdffit2_get_atoms__name__, pypdffit2_get_atoms, - METH_VARARGS, pypdffit2_get_atoms__doc__}, - - //num_atoms - {pypdffit2_num_atoms__name__, pypdffit2_num_atoms, - METH_VARARGS, pypdffit2_num_atoms__doc__}, - - //get_atom_types - {pypdffit2_get_atom_types__name__, pypdffit2_get_atom_types, - METH_VARARGS, pypdffit2_get_atom_types__doc__}, - - //num_phases - {pypdffit2_num_phases__name__, pypdffit2_num_phases, - METH_VARARGS, pypdffit2_num_phases__doc__}, - - //num_datasets - {pypdffit2_num_datasets__name__, pypdffit2_num_datasets, - METH_VARARGS, pypdffit2_num_datasets__doc__}, - - //phase_fractions - {pypdffit2_phase_fractions__name__, pypdffit2_phase_fractions, - METH_VARARGS, pypdffit2_phase_fractions__doc__}, - - //redirect_stdout - {pypdffit2_redirect_stdout__name__, pypdffit2_redirect_stdout, - METH_VARARGS, pypdffit2_redirect_stdout__doc__}, - - //is_element - {pypdffit2_is_element__name__, pypdffit2_is_element, - METH_VARARGS, pypdffit2_is_element__doc__}, - -// Sentinel - {0, 0} -}; - -// End of file diff --git a/src/extensions/pdffit2module/bindings.h b/src/extensions/pdffit2module/bindings.h deleted file mode 100644 index bf1e1406..00000000 --- a/src/extensions/pdffit2module/bindings.h +++ /dev/null @@ -1,27 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Method table for python module bindings. -* -* Comments: -* -***********************************************************************/ - -#ifndef PYPDFFIT2_BINDINGS_H -#define PYPDFFIT2_BINDINGS_H - -// the method table -extern struct PyMethodDef pypdffit2_methods[]; - -#endif // PYPDFFIT2_BINDINGS_H diff --git a/src/extensions/pdffit2module/misc.cc b/src/extensions/pdffit2module/misc.cc deleted file mode 100644 index 6d3bf4f6..00000000 --- a/src/extensions/pdffit2module/misc.cc +++ /dev/null @@ -1,2218 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Bindings from python to c++ PdfFit class. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include -#include -#include -#include -#include -#include -#include -#include - -#include "misc.h" -#include "pyexceptions.h" -#include "PyFileStreambuf.h" -#include "../libpdffit2/StringUtils.h" -#include "../libpdffit2/LocalPeriodicTable.h" -#include "../libpdffit2/pdffit.h" - -// ostream buffer used for engine output redirection -PyFileStreambuf* py_stdout_streambuf = NULL; - -// copyright -char pypdffit2_copyright__doc__[] = ""; -char pypdffit2_copyright__name__[] = "copyright"; - -static char pypdffit2_copyright_note[] = - "pdffit2 python module: Copyright (c) 2005-2016 Simon J. L. Billinge et al."; - -// constant strings for python capsule names (cn) -static char* cnpfit = "pdffit"; -static char* cnvar = "pdfvar"; - -PyObject * pypdffit2_copyright(PyObject *, PyObject *) -{ - return Py_BuildValue("s", pypdffit2_copyright_note); -} - -//helper function to convert a pylist to a double array. -void double_array_from_pylist(PyObject *pylist, double *d_array, int const length) -{ - //length is the size of the d_array and not necessarily equal to the length - //of the pylist - PyObject *pyval = 0; - - for(int i = 0; i < length; i++) { - pyval = PyList_GetItem(pylist, i); - d_array[i] = PyFloat_AsDouble(pyval); - } -} - -// helper function to delete PdfFit object -static void deletePdfFit(PyObject* ptr) -{ - PdfFit *pdf = (PdfFit *)PyCapsule_GetPointer(ptr, cnpfit); - delete pdf; - return; -} - -// create a PdfFit instance -char pypdffit2_create__doc__[] = ""; -char pypdffit2_create__name__[] = "create"; - -PyObject * pypdffit2_create(PyObject *, PyObject *args) -{ - PdfFit *ppdf = new PdfFit(); - PyObject *py_ppdf = PyCapsule_New((void *)ppdf, cnpfit, deletePdfFit); - return py_ppdf; -} - - -// read_struct -char pypdffit2_read_struct__doc__[] = "Read structure file into memory."; -char pypdffit2_read_struct__name__[] = "read_struct"; - -PyObject * pypdffit2_read_struct(PyObject *, PyObject *args) -{ - char *fname; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->read_struct(fname); - } - catch(structureError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - catch(IOError e) { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// read_struct_string -char pypdffit2_read_struct_string__doc__[] = "Read structure file into memory from a c-string."; -char pypdffit2_read_struct_string__name__[] = "read_struct_string"; - -PyObject * pypdffit2_read_struct_string(PyObject *, PyObject *args) -{ - char *buffer; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &buffer); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->read_struct_string(buffer); - } - catch(structureError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(pypdffit2_structureError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - - -// read_data -char pypdffit2_read_data__doc__[] = "Read data file into memory."; -char pypdffit2_read_data__name__[] = "read_data"; - -PyObject * pypdffit2_read_data(PyObject *, PyObject *args) -{ - char *fname; - char stype; - double qmax, qdamp; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oscdd", &py_ppdf, &fname, &stype, &qmax, &qdamp); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->read_data(fname, stype, qmax, qdamp); - } - catch(IOError e) { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(dataError e) { - PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// read_data_string -char pypdffit2_read_data_string__doc__[] = "Read data from string into memory."; -char pypdffit2_read_data_string__name__[] = "read_data_string"; - -PyObject * pypdffit2_read_data_string(PyObject *, PyObject *args) -{ - char *buffer; - char *c_name = NULL; - char stype; - double qmax, qdamp; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oscdd|s", &py_ppdf, &buffer, &stype, &qmax, &qdamp, &c_name); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - string name = c_name ? c_name : ""; - try { - string sbuffer(buffer); - ppdf->read_data_string(sbuffer, stype, qmax, qdamp, name); - } - catch(IOError e) { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(dataError e) { - PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// read_data_arrays - read_data_lists in PdfFit class -char pypdffit2_read_data_arrays__doc__[] = "Read data from arrays into memory."; -char pypdffit2_read_data_arrays__name__[] = "read_data_arrays"; - -PyObject * pypdffit2_read_data_arrays(PyObject *, PyObject *args) -{ - char stype; - double qmax, qdamp; - int length; - char * c_name = NULL; - double *r_data = NULL; - double *Gr_data = NULL; - double *dGr_data = NULL; - PyObject *py_r_data = Py_None; - PyObject *py_Gr_data = Py_None; - PyObject *py_dGr_data = Py_None; - PyObject *py_ppdf = NULL; - int ok = PyArg_ParseTuple(args, "OcddOO|Os", &py_ppdf, &stype, &qmax, &qdamp, - &py_r_data, &py_Gr_data, &py_dGr_data, &c_name); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - - length = PyList_Size(py_Gr_data); - //quick check that the arrays are all the same length // - int r_len = PyList_Size(py_r_data); - int dGr_len = length; - if(py_dGr_data != Py_None) { - dGr_len = PyList_Size(py_dGr_data); - } - if(r_len != length || dGr_len != length) - { - string err_string = "Data arrays have different lengths"; - PyErr_SetString(PyExc_ValueError, err_string.c_str()); - return 0; - } - - // create data arrays - r_data = new double [length]; - double_array_from_pylist(py_r_data, r_data, length); - Gr_data = new double [length]; - double_array_from_pylist(py_Gr_data, Gr_data, length); - if(py_dGr_data != Py_None) { - dGr_data = new double [length]; - double_array_from_pylist(py_dGr_data, dGr_data, length); - } - string name = c_name; - try { - ppdf->read_data_arrays(stype, qmax, qdamp, length, - r_data, Gr_data, dGr_data, name); - } - catch(dataError e) { - PyErr_SetString(pypdffit2_dataError, e.GetMsg().c_str()); - return 0; - } - - // read_data_arrays creates its own copy of the data, so we must delete our - // copies here. - delete [] r_data; - delete [] Gr_data; - if( dGr_data != NULL ) delete [] dGr_data; - Py_INCREF(Py_None); - return Py_None; -} - -// pdfrange (range in c) -char pypdffit2_pdfrange__doc__[] = "Set r-range of pdf."; -char pypdffit2_pdfrange__name__[] = "pdfrange"; - -PyObject * pypdffit2_pdfrange(PyObject *, PyObject *args) -{ - int iset; - double rmin, rmax; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oidd", &py_ppdf, &iset, &rmin, &rmax); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->range(iset, rmin, rmax); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// reset -char pypdffit2_reset__doc__[] = "reset pdf data"; -char pypdffit2_reset__name__[] = "reset"; - -PyObject * pypdffit2_reset(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - ppdf->reset(); - Py_INCREF(Py_None); - return Py_None; -} - -// alloc -char pypdffit2_alloc__doc__[] = "Allocate space for pdf data"; -char pypdffit2_alloc__name__[] = "alloc"; - -PyObject * pypdffit2_alloc(PyObject *, PyObject *args) -{ - char stype; - double qmax, qdamp, rmin, rmax; - int bin; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ocddddi", &py_ppdf, &stype, &qmax, &qdamp, &rmin, &rmax, &bin); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->alloc(stype, qmax, qdamp, rmin, rmax, bin); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// calc -char pypdffit2_calc__doc__[] = "calculate pdf from data"; -char pypdffit2_calc__name__[] = "calc"; - -PyObject * pypdffit2_calc(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->calc(); - } - catch (calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch (parseError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// refine -char pypdffit2_refine__doc__[] = "refine model to pdf data"; -char pypdffit2_refine__name__[] = "refine"; - -PyObject * pypdffit2_refine(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - double toler; - int ok = PyArg_ParseTuple(args, "Od", &py_ppdf, &toler); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - ppdf->refine(true, toler); - } - catch(constraintError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// local helper class for background thread in pypdffit2_refine_step() -namespace { - -class RefineStepHelper -{ - private: - PyThreadState* thread_state; - ostringstream msgout; - - public: - // Constructor saves thread state and arranges for holding - // engine output when redirected - RefineStepHelper() - { - if (py_stdout_streambuf) - { - NS_PDFFIT2::pout->rdbuf(msgout.rdbuf()); - } - thread_state = PyEval_SaveThread(); - } - - // method for restoring thread state and writing any outstanding output - void clean() - { - PyEval_RestoreThread(thread_state); - if (py_stdout_streambuf) - { - NS_PDFFIT2::pout->rdbuf(py_stdout_streambuf); - *NS_PDFFIT2::pout << msgout.str(); - } - } -}; - -} // local namespace - -// refine_step -char pypdffit2_refine_step__doc__[] = "Make one step in the refinement process."; -char pypdffit2_refine_step__name__[] = "refine_step"; - -PyObject * pypdffit2_refine_step(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - double toler; - int ok = PyArg_ParseTuple(args, "Od", &py_ppdf, &toler); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - RefineStepHelper janitor; // takes care of thread an output issues - int finished = 1; - try { - finished = ppdf->refine_step(true, toler); - } - catch(parseError e) { - // parseError is due to invalid constraint - janitor.clean(); - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch(constraintError e) { - janitor.clean(); - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch(calculationError e) { - janitor.clean(); - PyErr_SetString(pypdffit2_calculationError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) { - janitor.clean(); - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(...) { - janitor.clean(); - return 0; - } - janitor.clean(); - - return Py_BuildValue("i", finished); -} - -// save_pdf -char pypdffit2_save_pdf__doc__[] = "Save calculated pdf to file"; -char pypdffit2_save_pdf__name__[] = "save_pdf"; - -PyObject * pypdffit2_save_pdf(PyObject *, PyObject *args) -{ - char *fname; - int iset; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_pdf(iset, fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// save_dif -char pypdffit2_save_dif__doc__[] = "Save pdf difference to file"; -char pypdffit2_save_dif__name__[] = "save_dif"; - -PyObject * pypdffit2_save_dif(PyObject *, PyObject *args) -{ - char *fname; - int iset; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_dif(iset, fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// save_res -char pypdffit2_save_res__doc__[] = "Save residual to file"; -char pypdffit2_save_res__name__[] = "save_res"; - -PyObject * pypdffit2_save_res(PyObject *, PyObject *args) -{ - char *fname; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_res(fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// save_struct -char pypdffit2_save_struct__doc__[] = "Save refined structure to file"; -char pypdffit2_save_struct__name__[] = "save_struct"; - -PyObject * pypdffit2_save_struct(PyObject *, PyObject *args) -{ - char *fname; - int iset; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ois", &py_ppdf, &iset, &fname); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->save_struct(iset, fname); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(IOError e) - { - PyErr_SetString(PyExc_IOError, e.GetMsg().c_str()); - return 0; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// show_struct -char pypdffit2_show_struct__doc__[] = "Show structure."; -char pypdffit2_show_struct__name__[] = "show_struct"; - -PyObject * pypdffit2_show_struct(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - string outfilestring = ppdf->show_struct(ip); - return Py_BuildValue("s", outfilestring.c_str()); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// constrain to string -char pypdffit2_constrain_str__doc__[] = "Constrain refined variable to string."; -char pypdffit2_constrain_str__name__[] = "constrain_str"; - -PyObject* pypdffit2_constrain_str(PyObject*, PyObject* args) -{ - PyObject* py_v = 0; - char* vname; - char* form; - PyObject* py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OOss", &py_ppdf, &py_v, &vname, &form); - if (!ok) return 0; - PdfFit* ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - RefVar* v = (RefVar *) PyCapsule_GetPointer(py_v, cnvar); - if (v->type() != "RefVar") - { - string emsg = "cannot constrain non-refinable variable "; - emsg += vname; - PyErr_SetString(pypdffit2_constraintError, emsg.c_str()); - return 0; - } - if (v->isAssigned()) { - try { - ppdf->constrain(*v, form); - } - catch (constraintError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - } - else { - ostringstream emsg; - emsg << "Variable " << vname << " was not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, emsg.str().c_str()); - } - Py_INCREF(Py_None); - return Py_None; -} - -// constrain to integer. -char pypdffit2_constrain_int__doc__[] = "Constrain refined variable to integer."; -char pypdffit2_constrain_int__name__[] = "constrain_int"; - -PyObject* pypdffit2_constrain_int(PyObject*, PyObject* args) -{ - PyObject* py_v = 0; - int ftype = 0; - char* vname; - int ipar; - PyObject* py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OOsi|i", &py_ppdf, &py_v, &vname, &ipar, &ftype); - if (!ok) return 0; - PdfFit* ppdf = (PdfFit*) PyCapsule_GetPointer(py_ppdf, cnpfit); - RefVar* v = (RefVar*) PyCapsule_GetPointer(py_v, cnvar); - if (v->type() != "RefVar") - { - string emsg = "cannot constrain non-refinable variable "; - emsg += vname; - PyErr_SetString(pypdffit2_constraintError, emsg.c_str()); - return 0; - } - if (v->isAssigned()) { - try { - if (ftype) - { - ppdf->constrain(*v, ipar, (FCON)ftype); - } - else ppdf->constrain(*v, ipar); - } - catch (constraintError e) { - PyErr_SetString(pypdffit2_constraintError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - } - else { - ostringstream emsg; - emsg << "Variable " << vname << " was not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, emsg.str().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setpar with value of double -char pypdffit2_setpar_dbl__doc__[] = "Set parameter value."; -char pypdffit2_setpar_dbl__name__[] = "setpar_dbl"; - -PyObject * pypdffit2_setpar_dbl(PyObject *, PyObject *args) -{ - unsigned int n; - double val; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OId", &py_ppdf, &n, &val); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->setpar(n, val); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setpar with value of RefVar -char pypdffit2_setpar_RV__doc__[] = "Set parameter value via refined variable."; -char pypdffit2_setpar_RV__name__[] = "setpar_RV"; - -PyObject * pypdffit2_setpar_RV(PyObject *, PyObject *args) -{ - unsigned int n; - RefVar *v; - PyObject *py_v; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OIO", &py_ppdf, &n, &py_v); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - v = (RefVar *) PyCapsule_GetPointer(py_v, cnvar); - if( v->isAssigned() ) { - try - { - ppdf->setpar(n, *v); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - } - else { - string eout = "Variable not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setvar -char pypdffit2_setvar__doc__[] = "Set variable to value."; -char pypdffit2_setvar__name__[] = "setvar"; - -PyObject * pypdffit2_setvar(PyObject *, PyObject *args) -{ - double a; - NonRefVar *v; - PyObject *py_v; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OOd", &py_ppdf, &py_v, &a); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - v = (NonRefVar *) PyCapsule_GetPointer(py_v, cnvar); - if( v->isAssigned() ) { - ppdf->setvar(*v, a); - } - else { - string eout = "Must import a structure"; - PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// getvar -char pypdffit2_getvar__doc__[] = "Get variable value."; -char pypdffit2_getvar__name__[] = "getvar"; - -PyObject * pypdffit2_getvar(PyObject *, PyObject *args) -{ - NonRefVar *v = 0; - PyObject *py_v = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OO", &py_ppdf, &py_v); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - v = (NonRefVar *) PyCapsule_GetPointer(py_v, cnvar); - if(v->isAssigned()) { - double crval = ppdf->getvar(*v); - return Py_BuildValue("d", crval); - } - else { - string eout = "Variable not yet assigned"; - PyErr_SetString(pypdffit2_unassignedError, eout.c_str()); - return 0; - Py_INCREF(Py_None); - return Py_None; - } -} - -// getcrw -char pypdffit2_getcrw__doc__[] = "Get cumulative Rw for the current dataset."; -char pypdffit2_getcrw__name__[] = "getcrw"; - -PyObject * pypdffit2_getcrw(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - vector crw = ppdf->getcrw(); - PyObject *py_r; - py_r = PyList_New(crw.size()); - for (int i = 0; i != int(crw.size()); ++i) - { - PyList_SetItem(py_r, i, PyFloat_FromDouble(crw[i])); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// getrw -char pypdffit2_getrw__doc__[] = "Get rw of fit."; -char pypdffit2_getrw__name__[] = "getrw"; - -PyObject * pypdffit2_getrw(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - double crval = ppdf->getrw(); - return Py_BuildValue("d", crval); -} - -// getR -char pypdffit2_getR__doc__[] = "Get list of r-values for plotting."; -char pypdffit2_getR__name__[] = "getR"; - -PyObject * pypdffit2_getR(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - /* One should not put functionality in the bindings. However, - * this function is meant to create a python object from a - * c-object that does not actually exist. All that is stored - * in pdffit about the fitted R-range is the minimum, maximum, - * and step size. This binding turns that info into a python - * list. If the number of fit points stored in nfmax and nfmin - * have not yet been assigned, then this falls back on the - * r-points. This is crucial so that one can investigate the - * PDF before any fitting has been done. Once fit parameters - * have been established, they can be used and the r list, - * pdf-obs list, and pdf-fit list will be the same size. - * Also see getpdf_obs(). - */ - try - { - int nfmin = ppdf->getnfmin(); - int nfmax = ppdf->getnfmax(); - int len = nfmax - nfmin + 1; - double rmin = ppdf->getrmin(); - double rmax = ppdf->getrmax(); - double deltar = ppdf->getdeltar(); - PyObject *py_r; - if(len == 1) - { - nfmin = 0; - nfmax = (int) ((rmax - rmin)/deltar); - len = nfmax + 1; - } - py_r = PyList_New(len); - for (int i=nfmin;i<=nfmax;i++) - { - PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", i*deltar + rmin)); - } - - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - - -// getpdf_fit -char pypdffit2_getpdf_fit__doc__[] = "Get list of calculated pdf points."; -char pypdffit2_getpdf_fit__name__[] = "getpdf_fit"; - -PyObject * pypdffit2_getpdf_fit(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - //Return only the data range used in the fit - try - { - int min = ppdf->getnfmin(); - int max = ppdf->getnfmax(); - int len = max - min + 1; - vector v_pdfdata = ppdf->getpdf_fit(); - PyObject *py_r; - py_r = PyList_New(len); - for (int i=min;i<=max;i++) { - PyList_SetItem(py_r, i-min, Py_BuildValue("d", v_pdfdata[i])); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - - -// getpdf_obs -char pypdffit2_getpdf_obs__doc__[] = "Get list of observed (theory) pdf points."; -char pypdffit2_getpdf_obs__name__[] = "getpdf_obs"; - -PyObject * pypdffit2_getpdf_obs(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - vector v_pdfdata = ppdf->getpdf_obs(); - int nfmin = ppdf->getnfmin(); - int nfmax = ppdf->getnfmax(); - int len = nfmax - nfmin + 1; - //Return only the data range used in the fit - PyObject *py_r; - py_r = PyList_New(len); - for (int i=nfmin;i<=nfmax;i++) { - PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", v_pdfdata[i])); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// getpdf_diff -char pypdffit2_getpdf_diff__doc__[] = "Get list of differences between observed and fitted PDF points."; -char pypdffit2_getpdf_diff__name__[] = "getpdf_diff"; - -PyObject * pypdffit2_getpdf_diff(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - vector Gobs = ppdf->getpdf_obs(); - vector Gfit = ppdf->getpdf_fit(); - int nfmin = ppdf->getnfmin(); - int nfmax = ppdf->getnfmax(); - int len = nfmax - nfmin + 1; - //Return only the data range used in the fit - PyObject *py_r; - py_r = PyList_New(len); - for (int i = nfmin; i <= nfmax; i++) { - double Gdiff_i = Gobs[i] - Gfit[i]; - PyList_SetItem(py_r, i-nfmin, Py_BuildValue("d", Gdiff_i)); - } - return py_r; - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - - -// getpar -char pypdffit2_getpar__doc__[] = "Get value of parameter"; -char pypdffit2_getpar__name__[] = "getpar"; - -PyObject * pypdffit2_getpar(PyObject *, PyObject *args) -{ - unsigned int n; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "OI", &py_ppdf, &n); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - double crval = ppdf->getpar(n); - return Py_BuildValue("d", crval); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// fixpar -char pypdffit2_fixpar__doc__[] = "Fix value of parameter."; -char pypdffit2_fixpar__name__[] = "fixpar"; - -PyObject * pypdffit2_fixpar(PyObject *, PyObject *args) -{ - int n; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &n); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->fixpar(n); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// freepar -char pypdffit2_freepar__doc__[] = "Free parameter."; -char pypdffit2_freepar__name__[] = "freepar"; - -PyObject * pypdffit2_freepar(PyObject *, PyObject *args) -{ - int n; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &n); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->freepar(n); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setphase -char pypdffit2_setphase__doc__[] = "Set phase in focus."; -char pypdffit2_setphase__name__[] = "setphase"; - -PyObject * pypdffit2_setphase(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->setphase(ip); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// setdata -char pypdffit2_setdata__doc__[] = "Set data in focus."; -char pypdffit2_setdata__name__[] = "setdata"; - -PyObject * pypdffit2_setdata(PyObject *, PyObject *args) -{ - int is; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &is); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->setdata(is); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// psel -char pypdffit2_psel__doc__[] = "Select phase in focus."; -char pypdffit2_psel__name__[] = "psel"; - -PyObject * pypdffit2_psel(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selphase(ip); - } - catch(unassignedError e) - { - // PyErr_Warn(PyExc_Warning, e.GetMsg().c_str()); - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// pdesel -char pypdffit2_pdesel__doc__[] = "Deselect phase in focus."; -char pypdffit2_pdesel__name__[] = "pdesel"; - -PyObject * pypdffit2_pdesel(PyObject *, PyObject *args) -{ - int ip; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->pdesel(ip); - } - catch(unassignedError e) - { - // PyErr_Warn(PyExc_Warning, e.GetMsg().c_str()); - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectAtomType -char pypdffit2_selectAtomType__doc__[] = "Include element in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectAtomType__name__[] = "selectAtomType"; - -PyObject * pypdffit2_selectAtomType(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - char* smbpat; - bool select; - int ok = PyArg_ParseTuple(args, "Oicsb", &py_ppdf, &ip, &ijchar, &smbpat, &select); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectAtomType(ip, ijchar, smbpat, select); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectAtomIndex -char pypdffit2_selectAtomIndex__doc__[] = "Include atom of given index in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectAtomIndex__name__[] = "selectAtomIndex"; - -PyObject * pypdffit2_selectAtomIndex(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - int aidx1; - bool select; - int ok = PyArg_ParseTuple(args, "Oicib", &py_ppdf, &ip, &ijchar, &aidx1, &select); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectAtomIndex(ip, ijchar, aidx1, select); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectAll -char pypdffit2_selectAll__doc__[] = "Include all atoms in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectAll__name__[] = "selectAll"; - -PyObject * pypdffit2_selectAll(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - int ok = PyArg_ParseTuple(args, "Oic", &py_ppdf, &ip, &ijchar); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectAll(ip, ijchar); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// selectNone -char pypdffit2_selectNone__doc__[] = "Include all atoms in 'i' or 'j' pair of PDF calculation."; -char pypdffit2_selectNone__name__[] = "selectNone"; - -PyObject * pypdffit2_selectNone(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip; - char ijchar; - int ok = PyArg_ParseTuple(args, "Oic", &py_ppdf, &ip, &ijchar); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try - { - ppdf->selectNone(ip, ijchar); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) - { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// bond_angle -char pypdffit2_bond_angle__doc__[] = "Return bond angle between three atoms."; -char pypdffit2_bond_angle__name__[] = "bond_angle"; - -PyObject * pypdffit2_bond_angle(PyObject *, PyObject *args) -{ - int ia, ja, ka; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oiii", &py_ppdf, &ia, &ja, &ka); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - pair angstd = ppdf->bond_angle(ia, ja, ka); - PyObject* py_tpl; - py_tpl = Py_BuildValue("(d,d)", angstd.first, angstd.second); - return py_tpl; - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// bond_length_atoms (nearest bond length between two atoms) -char pypdffit2_bond_length_atoms__doc__[] = - "Return a tuple of (dij, ddij) for distance between two atoms\n" - "and its standard deviation."; -char pypdffit2_bond_length_atoms__name__[] = "bond_length_atoms"; - -PyObject * pypdffit2_bond_length_atoms(PyObject *, PyObject *args) -{ - int ia, ja; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oii", &py_ppdf, &ia, &ja); - PairDistance pd; - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - pd = ppdf->bond_length_atoms(ia, ja); - PyObject *py_tpl; - py_tpl = Py_BuildValue("(d,d)", pd.dij, pd.ddij); - return py_tpl; - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// bond_length_types (bond lengths between two elements inside given bounds) -char pypdffit2_bond_length_types__doc__[] = - "Return bond lengths between two elements within given bounds\n" - "\n" - "a1 -- symbol of the first element in pair or 'ALL'\n" - "a2 -- symbol of the second element in pair or 'ALL'\n" - "lb -- lower bound for bond lengths\n" - "ub -- upper bound for bond lengths\n" - "\n" - "Return a dictionary of distance data containing:\n" - "\n" - "dij : list of bond lengths within given bounds\n" - "ddij : list of bond length standard deviations\n" - "ij0 : list of tupled pairs of indices starting at 0\n" - "ij1 : list of tupled pairs of indices starting at 1"; -char pypdffit2_bond_length_types__name__[] = "bond_length_types"; - -PyObject * pypdffit2_bond_length_types(PyObject *, PyObject *args) -{ - char* symi; - char* symj; - double bmin = 0; - double bmax = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ossdd", &py_ppdf, &symi, &symj, &bmin, &bmax); - vector pdvec; - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - pdvec = ppdf->bond_length_types(symi, symj, bmin, bmax); - int np = pdvec.size(); - PyObject* py_dij; - PyObject* py_ddij; - PyObject* py_ij0; - PyObject* py_ij1; - py_dij = PyList_New(np); - py_ddij = PyList_New(np); - py_ij0 = PyList_New(np); - py_ij1 = PyList_New(np); - for (int i = 0; i < np; ++i) - { - PairDistance& pd = pdvec[i]; - PyObject *py_item; - py_item = PyFloat_FromDouble(pd.dij); - PyList_SetItem(py_dij, i, py_item); - py_item = PyFloat_FromDouble(pd.ddij); - PyList_SetItem(py_ddij, i, py_item); - py_item = Py_BuildValue("(i,i)", pd.i - 1, pd.j - 1); - PyList_SetItem(py_ij0, i, py_item); - py_item = Py_BuildValue("(i,i)", pd.i, pd.j); - PyList_SetItem(py_ij1, i, py_item); - } - PyObject* py_rv; - py_rv = PyDict_New(); - PyDict_SetItemString(py_rv, "dij", py_dij); - PyDict_SetItemString(py_rv, "ddij", py_ddij); - PyDict_SetItemString(py_rv, "ij0", py_ij0); - PyDict_SetItemString(py_rv, "ij1", py_ij1); - return py_rv; - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } -} - -// get_scat_string -char pypdffit2_get_scat_string__doc__[] = "Return string with scatter details."; -char pypdffit2_get_scat_string__name__[] = "get_scat_string"; - -PyObject * pypdffit2_get_scat_string(PyObject *, PyObject *args) -{ - char stype; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oc", &py_ppdf, &stype); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - string outstring; - if (!ppdf->curphase) - { - PyErr_SetString(pypdffit2_unassignedError, "No scatterers exist"); - return 0; - } - // here curphase exists, get_scat_string throws runtime error - // for invalid stype. - try { - outstring = (ppdf->curphase)->get_scat_string(stype); - } - catch (runtime_error e) { - PyErr_SetString(PyExc_ValueError, e.what()); - return 0; - } - return Py_BuildValue("s", outstring.c_str()); -} - -// get_scat -char pypdffit2_get_scat__doc__[] = "Return scattering factor for given element."; -char pypdffit2_get_scat__name__[] = "get_scat"; - -PyObject * pypdffit2_get_scat(PyObject *, PyObject *args) -{ - char stype; - char* smbpat; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ocs", &py_ppdf, &stype, &smbpat); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - double value; - try { - value = ppdf->get_scat(stype, smbpat); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - PyObject* py_rv; - py_rv = PyFloat_FromDouble(value); - return py_rv; -} - -// set_scat -char pypdffit2_set_scat__doc__[] = "Set custom scattering factor for given element."; -char pypdffit2_set_scat__name__[] = "set_scat"; - -PyObject * pypdffit2_set_scat(PyObject *, PyObject *args) -{ - char stype; - char* smbpat; - double value; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Ocsd", &py_ppdf, &stype, &smbpat, &value); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - if (!ppdf->curphase) - { - PyErr_SetString(pypdffit2_unassignedError, "phase does not exist"); - return 0; - } - // Here curphase exists. set_scat may throw - // runtime or ValueError for invalid arguments - try { - ppdf->curphase->set_scat(stype, smbpat, value); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - catch (runtime_error e) { - PyErr_SetString(PyExc_ValueError, e.what()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -// reset_scat -char pypdffit2_reset_scat__doc__[] = "Reset scattering factor for given element."; -char pypdffit2_reset_scat__name__[] = "reset_scat"; - -PyObject * pypdffit2_reset_scat(PyObject *, PyObject *args) -{ - char* smbpat; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Os", &py_ppdf, &smbpat); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - if (!ppdf->curphase) - { - PyErr_SetString(pypdffit2_unassignedError, "phase does not exist"); - return 0; - } - // Here curphase exists. reset_scat may throw - // runtime or ValueError for invalid arguments - try { - ppdf->curphase->reset_scat(smbpat); - } - catch (ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } - Py_INCREF(Py_None); - return Py_None; -} - -//throw-away variable that helps with exception handling -//RefVar *_junkRV = new RefVar(); -// utility function (not available from Python) -RefVar *getRefVar(vector &v, unsigned int i) -{ - if (v.size() == 0) - { - throw unassignedError("Variable not yet assigned"); - } - else if (i > v.size() || i < 1) - { - stringstream errstr; - errstr << "Index " << i << " out of bounds"; - throw ValueError(errstr.str()); - } - return &v[i-1]; -} - -//current phase and set refinable variable pointers - -// lat -char pypdffit2_lat__doc__[] = "Pointer to refinable variable lat."; -char pypdffit2_lat__name__[] = "lat"; - -PyObject * pypdffit2_lat(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->lat,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// x -char pypdffit2_x__doc__[] = "Pointer to refinable variable x."; -char pypdffit2_x__name__[] = "x"; - -PyObject * pypdffit2_x(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->x,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// y -char pypdffit2_y__doc__[] = "Pointer to refinable variable y."; -char pypdffit2_y__name__[] = "y"; - -PyObject * pypdffit2_y(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->y,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// z -char pypdffit2_z__doc__[] = "Pointer to refinable variable z."; -char pypdffit2_z__name__[] = "z"; - -PyObject * pypdffit2_z(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->z,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u11 -char pypdffit2_u11__doc__[] = "Pointer to refinable variable u11."; -char pypdffit2_u11__name__[] = "u11"; - -PyObject * pypdffit2_u11(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u11,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u22 -char pypdffit2_u22__doc__[] = "Pointer to refinable variable u22."; -char pypdffit2_u22__name__[] = "u22"; - -PyObject * pypdffit2_u22(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u22,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u33 -char pypdffit2_u33__doc__[] = "Pointer to refinable variable u33."; -char pypdffit2_u33__name__[] = "u33"; - -PyObject * pypdffit2_u33(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u33,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u12 -char pypdffit2_u12__doc__[] = "Pointer to refinable variable u12."; -char pypdffit2_u12__name__[] = "u12"; - -PyObject * pypdffit2_u12(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u12,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u13 -char pypdffit2_u13__doc__[] = "Pointer to refinable variable u13."; -char pypdffit2_u13__name__[] = "u13"; - -PyObject * pypdffit2_u13(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u13,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// u23 -char pypdffit2_u23__doc__[] = "Pointer to refinable variable u23."; -char pypdffit2_u23__name__[] = "u23"; - -PyObject * pypdffit2_u23(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->u23,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// occ -char pypdffit2_occ__doc__[] = "Pointer to refinable variable occ."; -char pypdffit2_occ__name__[] = "occ"; - -PyObject * pypdffit2_occ(PyObject *, PyObject *args) -{ - int i; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "Oi", &py_ppdf, &i); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - try { - RefVar *v = getRefVar(ppdf->occ,i); - PyObject *py_v = PyCapsule_New(v, cnvar, NULL); - return py_v; - } - catch(unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - catch(ValueError e) { - PyErr_SetString(PyExc_ValueError, e.GetMsg().c_str()); - return 0; - } -} - -// pscale -char pypdffit2_pscale__doc__[] = "Pointer to variable pscale."; -char pypdffit2_pscale__name__[] = "pscale"; - -PyObject * pypdffit2_pscale(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->pscale), cnvar, NULL); - return py_v; -} - -// spdiameter -char pypdffit2_spdiameter__doc__[] = "Pointer to variable spdiameter."; -char pypdffit2_spdiameter__name__[] = "spdiameter"; - -PyObject * pypdffit2_spdiameter(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->spdiameter), cnvar, NULL); - return py_v; -} - -// stepcut -char pypdffit2_stepcut__doc__[] = "Pointer to nonvariable stepcut."; -char pypdffit2_stepcut__name__[] = "stepcut"; - -PyObject * pypdffit2_stepcut(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->stepcut), cnvar, NULL); - return py_v; -} - -// sratio -char pypdffit2_sratio__doc__[] = "Pointer to variable sratio."; -char pypdffit2_sratio__name__[] = "sratio"; - -PyObject * pypdffit2_sratio(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->sratio), cnvar, NULL); - return py_v; -} - -// delta2 -char pypdffit2_delta2__doc__[] = "Pointer to variable delta2."; -char pypdffit2_delta2__name__[] = "delta2"; - -PyObject * pypdffit2_delta2(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->delta2), cnvar, NULL); - return py_v; -} - -// delta1 -char pypdffit2_delta1__doc__[] = "Pointer to variable delta1."; -char pypdffit2_delta1__name__[] = "delta1"; - -PyObject * pypdffit2_delta1(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->delta1), cnvar, NULL); - return py_v; -} - -// dscale -char pypdffit2_dscale__doc__[] = "Pointer to variable dscale."; -char pypdffit2_dscale__name__[] = "dscale"; - -PyObject * pypdffit2_dscale(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->dscale), cnvar, NULL); - return py_v; -} - -// qdamp -char pypdffit2_qdamp__doc__[] = "Pointer to variable qdamp."; -char pypdffit2_qdamp__name__[] = "qdamp"; - -PyObject * pypdffit2_qdamp(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->qdamp), cnvar, NULL); - return py_v; -} - -// qbroad -char pypdffit2_qbroad__doc__[] = "Pointer to variable qbroad."; -char pypdffit2_qbroad__name__[] = "qbroad"; - -PyObject * pypdffit2_qbroad(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->qbroad), cnvar, NULL); - return py_v; -} - -// rcut -char pypdffit2_rcut__doc__[] = "Pointer to nonvariable rcut."; -char pypdffit2_rcut__name__[] = "rcut"; - -PyObject * pypdffit2_rcut(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - PyObject *py_v = PyCapsule_New(&(ppdf->rcut), cnvar, NULL); - return py_v; -} - -// get_atoms -char pypdffit2_get_atoms__doc__[] = "Get element symbols of atoms in the phase."; -char pypdffit2_get_atoms__name__[] = "get_atoms"; - -PyObject * pypdffit2_get_atoms(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip = 0; - int ok = PyArg_ParseTuple(args, "O|i", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - Phase* ph; - try { - ph = ppdf->getphase(ip); - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - // Phase ph is defined here - PyObject *py_atoms = PyList_New(ph->natoms); - for (int i = 0; i < ph->natoms; ++i) - { - string usymbol = toupper(ph->atom[i].atom_type->symbol); - PyList_SetItem(py_atoms, i, PyUnicode_FromString(usymbol.c_str())); - } - return py_atoms; -} - -// num_atoms -char pypdffit2_num_atoms__doc__[] = "Get the number of atoms in the current phase."; -char pypdffit2_num_atoms__name__[] = "num_atoms"; - -PyObject * pypdffit2_num_atoms(PyObject *, PyObject *args) -{ - int retval = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - if (ppdf->curphase) - { - retval = (ppdf->curphase)->natoms; - } - else - { - PyErr_SetString(pypdffit2_unassignedError, "No data loaded"); - return 0; - } - return Py_BuildValue("i", retval); -} - -// get_atom_types -char pypdffit2_get_atom_types__doc__[] = "Get ordered unique symbols of atoms in the phase."; -char pypdffit2_get_atom_types__name__[] = "get_atom_types"; - -PyObject * pypdffit2_get_atom_types(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ip = 0; - int ok = PyArg_ParseTuple(args, "O|i", &py_ppdf, &ip); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - Phase* ph; - try { - ph = ppdf->getphase(ip); - } - catch (unassignedError e) { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - // Phase ph is defined here - PyObject *py_atom_types = PyList_New(ph->atom_types.size()); - for (int i = 0; i < int(ph->atom_types.size()); ++i) - { - string usymbol = toupper(ph->atom_types[i]->symbol); - PyList_SetItem(py_atom_types, i, PyUnicode_FromString(usymbol.c_str())); - } - return py_atom_types; -} - - -// num_phases -char pypdffit2_num_phases__doc__[] = "Get the number of loaded phases."; -char pypdffit2_num_phases__name__[] = "num_phases"; - -PyObject * pypdffit2_num_phases(PyObject *, PyObject *args) -{ - int retval = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - retval = ppdf->num_phases(); - return Py_BuildValue("i", retval); -} - - -// num_datasets -char pypdffit2_num_datasets__doc__[] = "Get the number of loaded datasets."; -char pypdffit2_num_datasets__name__[] = "num_datasets"; - -PyObject * pypdffit2_num_datasets(PyObject *, PyObject *args) -{ - int retval = 0; - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - retval = ppdf->num_datasets(); - return Py_BuildValue("i", retval); -} - - -// phase_fractions -char pypdffit2_phase_fractions__doc__[] = - "Return relative phase fractions for current dataset scattering type\n" - "\n" - "Return a dictionary of relative phase fractions:\n" - "\n" - "atom -- list of fractions normalized to atom count\n" - "stdatom -- errors of atom count fractions\n" - "cell -- list of fractions normalized to unit cell count\n" - "stdcell -- errors of unit cell count fractions\n" - "mass -- list of relative weight fractions\n" - "stdmass -- errors of relative weight fractions\n" - ; -char pypdffit2_phase_fractions__name__[] = "phase_fractions"; - -PyObject * pypdffit2_phase_fractions(PyObject *, PyObject *args) -{ - PyObject *py_ppdf = 0; - int ok = PyArg_ParseTuple(args, "O", &py_ppdf); - if (!ok) return 0; - PdfFit *ppdf = (PdfFit *) PyCapsule_GetPointer(py_ppdf, cnpfit); - map > fractions; - try - { - fractions = ppdf->getPhaseFractions(); - } - catch(unassignedError e) - { - PyErr_SetString(pypdffit2_unassignedError, e.GetMsg().c_str()); - return 0; - } - // convert fractions map to an equivalent python dictionary - map >::iterator ii; - PyObject* py_rv; - py_rv = PyDict_New(); - for (ii = fractions.begin(); ii != fractions.end(); ++ii) - { - int n = ii->second.size(); - PyObject* py_lst; - py_lst = PyList_New(n); - for (int i = 0; i < n; ++i) - { - PyObject* py_value; - py_value = PyFloat_FromDouble(ii->second.at(i)); - PyList_SetItem(py_lst, i, py_value); - } - PyDict_SetItemString(py_rv, ii->first.c_str(), py_lst); - } - return py_rv; -} - -// redirect_stdout -char pypdffit2_redirect_stdout__doc__[] = "Redirect engine output to a file-like object."; -char pypdffit2_redirect_stdout__name__[] = "redirect_stdout"; - -PyObject * pypdffit2_redirect_stdout(PyObject *, PyObject *args) -{ - // instance of PyFileStreambuf which takes care of redirection - PyObject *py_file = nullptr; - if (!PyArg_ParseTuple(args, "O", &py_file)) return nullptr; - // check if py_file has write and flush attributes - if ( !PyObject_HasAttrString(py_file, "write") || - !PyObject_HasAttrString(py_file, "flush") ) - { - PyErr_SetString(PyExc_TypeError, "expected file-like argument"); - return nullptr; - } - // create py_stdout_streambuf if necessary - if (!py_stdout_streambuf) - { - py_stdout_streambuf = new PyFileStreambuf(py_file); - } - py_stdout_streambuf->redirect(py_file); - // on first redirection we need to assign new ostream to NS_PDFFIT2::pout - if (NS_PDFFIT2::pout == &std::cout) - { - NS_PDFFIT2::pout = new std::ostream(py_stdout_streambuf); - } - Py_INCREF(Py_None); - return Py_None; -} - -// is_element -char pypdffit2_is_element__doc__[] = "Check if element or isotope is defined in the built-in periodic table."; -char pypdffit2_is_element__name__[] = "is_element"; - -PyObject * pypdffit2_is_element(PyObject *, PyObject *args) -{ - // instance of PyFileStreambuf which takes care of redirection - char *smbpat; - int ok = PyArg_ParseTuple(args, "s", &smbpat); - if (!ok) return 0; - const LocalPeriodicTable* lpt = LocalPeriodicTable::instance(); - PyObject *rv = PyBool_FromLong(lpt->has(smbpat)); - return rv; -} - -// End of file diff --git a/src/extensions/pdffit2module/misc.h b/src/extensions/pdffit2module/misc.h deleted file mode 100644 index 3374fa5f..00000000 --- a/src/extensions/pdffit2module/misc.h +++ /dev/null @@ -1,487 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Bindings from python to c++ PdfFit class. -* -* Comments: -* -***********************************************************************/ - -#ifndef PYPDFFIT2_MISC_H -#define PYPDFFIT2_MISC_H - -// copyright -extern char pypdffit2_copyright__name__[]; -extern char pypdffit2_copyright__doc__[]; -extern "C" -PyObject * pypdffit2_copyright(PyObject *, PyObject *); - -// create -extern char pypdffit2_create__name__[]; -extern char pypdffit2_create__doc__[]; -extern "C" -PyObject * pypdffit2_create(PyObject *, PyObject *); - -// read_struct -extern char pypdffit2_read_struct__name__[]; -extern char pypdffit2_read_struct__doc__[]; -extern "C" -PyObject * pypdffit2_read_struct(PyObject *, PyObject *); - -// read_struct_string -extern char pypdffit2_read_struct_string__name__[]; -extern char pypdffit2_read_struct_string__doc__[]; -extern "C" -PyObject * pypdffit2_read_struct_string(PyObject *, PyObject *); - -// read_data -extern char pypdffit2_read_data__name__[]; -extern char pypdffit2_read_data__doc__[]; -extern "C" -PyObject * pypdffit2_read_data(PyObject *, PyObject *); - -// read_data_string -extern char pypdffit2_read_data_string__name__[]; -extern char pypdffit2_read_data_string__doc__[]; -extern "C" -PyObject * pypdffit2_read_data_string(PyObject *, PyObject *); - -// read_data_arrays -extern char pypdffit2_read_data_arrays__name__[]; -extern char pypdffit2_read_data_arrays__doc__[]; -extern "C" -PyObject * pypdffit2_read_data_arrays(PyObject *, PyObject *); - -// pdfrange -extern char pypdffit2_pdfrange__doc__[]; -extern char pypdffit2_pdfrange__name__[]; -extern "C" -PyObject * pypdffit2_pdfrange(PyObject *, PyObject *); - -// reset -extern char pypdffit2_reset__doc__[]; -extern char pypdffit2_reset__name__[]; -extern "C" -PyObject * pypdffit2_reset(PyObject *, PyObject *); - -// alloc -extern char pypdffit2_alloc__doc__[]; -extern char pypdffit2_alloc__name__[]; -extern "C" -PyObject * pypdffit2_alloc(PyObject *, PyObject *); - -// calc -extern char pypdffit2_calc__doc__[]; -extern char pypdffit2_calc__name__[]; -extern "C" -PyObject * pypdffit2_calc(PyObject *, PyObject *); - -// refine -extern char pypdffit2_refine__doc__[]; -extern char pypdffit2_refine__name__[]; -extern "C" -PyObject * pypdffit2_refine(PyObject *, PyObject *); - -// refine_step -extern char pypdffit2_refine_step__doc__[]; -extern char pypdffit2_refine_step__name__[]; -extern "C" -PyObject * pypdffit2_refine_step(PyObject *, PyObject *); - -// save_pdf -extern char pypdffit2_save_pdf__doc__[]; -extern char pypdffit2_save_pdf__name__[]; -extern "C" -PyObject * pypdffit2_save_pdf(PyObject *, PyObject *); - -// save_dif -extern char pypdffit2_save_dif__doc__[]; -extern char pypdffit2_save_dif__name__[]; -extern "C" -PyObject * pypdffit2_save_dif(PyObject *, PyObject *); - -// save_res -extern char pypdffit2_save_res__doc__[]; -extern char pypdffit2_save_res__name__[]; -extern "C" -PyObject * pypdffit2_save_res(PyObject *, PyObject *); - -// save_struct -extern char pypdffit2_save_struct__doc__[]; -extern char pypdffit2_save_struct__name__[]; -extern "C" -PyObject * pypdffit2_save_struct(PyObject *, PyObject *); - -// show_struct -extern char pypdffit2_show_struct__doc__[]; -extern char pypdffit2_show_struct__name__[]; -extern "C" -PyObject * pypdffit2_show_struct(PyObject *, PyObject *); - -// constrain to string -extern char pypdffit2_constrain_str__doc__[]; -extern char pypdffit2_constrain_str__name__[]; -extern "C" -PyObject * pypdffit2_constrain_str(PyObject *, PyObject *); - -// constrain_int to integer -extern char pypdffit2_constrain_int__doc__[]; -extern char pypdffit2_constrain_int__name__[]; -extern "C" -PyObject * pypdffit2_constrain_int(PyObject *, PyObject *); - -// setpar_dbl -extern char pypdffit2_setpar_dbl__doc__[]; -extern char pypdffit2_setpar_dbl__name__[]; -extern "C" -PyObject * pypdffit2_setpar_dbl(PyObject *, PyObject *); - -// setpar with RefVar -extern char pypdffit2_setpar_RV__doc__[]; -extern char pypdffit2_setpar_RV__name__[]; -extern "C" -PyObject * pypdffit2_setpar_RV(PyObject *, PyObject *); - -// setvar -extern char pypdffit2_setvar__doc__[]; -extern char pypdffit2_setvar__name__[]; -extern "C" -PyObject * pypdffit2_setvar(PyObject *, PyObject *); - -// getvar -extern char pypdffit2_getvar__doc__[]; -extern char pypdffit2_getvar__name__[]; -extern "C" -PyObject * pypdffit2_getvar(PyObject *, PyObject *); - -// getR -extern char pypdffit2_getR__doc__[]; -extern char pypdffit2_getR__name__[]; -extern "C" -PyObject * pypdffit2_getR(PyObject *, PyObject *); - -// getpdf_fit -extern char pypdffit2_getpdf_fit__doc__[]; -extern char pypdffit2_getpdf_fit__name__[]; -extern "C" -PyObject * pypdffit2_getpdf_fit(PyObject *, PyObject *); - -// getpdf_obs -extern char pypdffit2_getpdf_obs__doc__[]; -extern char pypdffit2_getpdf_obs__name__[]; -extern "C" -PyObject * pypdffit2_getpdf_obs(PyObject *, PyObject *); - -// getpdf_diff -extern char pypdffit2_getpdf_diff__doc__[]; -extern char pypdffit2_getpdf_diff__name__[]; -extern "C" -PyObject * pypdffit2_getpdf_diff(PyObject *, PyObject *); - -// getcrw -extern char pypdffit2_getcrw__doc__[]; -extern char pypdffit2_getcrw__name__[]; -extern "C" -PyObject * pypdffit2_getcrw(PyObject *, PyObject *); - -// getrw -extern char pypdffit2_getrw__doc__[]; -extern char pypdffit2_getrw__name__[]; -extern "C" -PyObject * pypdffit2_getrw(PyObject *, PyObject *); - -// getpar -extern char pypdffit2_getpar__doc__[]; -extern char pypdffit2_getpar__name__[]; -extern "C" -PyObject * pypdffit2_getpar(PyObject *, PyObject *); - -// fixpar -extern char pypdffit2_fixpar__doc__[]; -extern char pypdffit2_fixpar__name__[]; -extern "C" -PyObject * pypdffit2_fixpar(PyObject *, PyObject *); - -// freepar -extern char pypdffit2_freepar__doc__[]; -extern char pypdffit2_freepar__name__[]; -extern "C" -PyObject * pypdffit2_freepar(PyObject *, PyObject *); - -// setphase -extern char pypdffit2_setphase__doc__[]; -extern char pypdffit2_setphase__name__[]; -extern "C" -PyObject * pypdffit2_setphase(PyObject *, PyObject *); - -// setdata -extern char pypdffit2_setdata__doc__[]; -extern char pypdffit2_setdata__name__[]; -extern "C" -PyObject * pypdffit2_setdata(PyObject *, PyObject *); - -// psel -extern char pypdffit2_psel__doc__[]; -extern char pypdffit2_psel__name__[]; -extern "C" -PyObject * pypdffit2_psel(PyObject *, PyObject *); - -// pdesel -extern char pypdffit2_pdesel__doc__[]; -extern char pypdffit2_pdesel__name__[]; -extern "C" -PyObject * pypdffit2_pdesel(PyObject *, PyObject *); - -// selectAtomType -extern char pypdffit2_selectAtomType__doc__[]; -extern char pypdffit2_selectAtomType__name__[]; -extern "C" -PyObject * pypdffit2_selectAtomType(PyObject *, PyObject *); - -// selectAtomIndex -extern char pypdffit2_selectAtomIndex__doc__[]; -extern char pypdffit2_selectAtomIndex__name__[]; -extern "C" -PyObject * pypdffit2_selectAtomIndex(PyObject *, PyObject *); - -// selectAll -extern char pypdffit2_selectAll__doc__[]; -extern char pypdffit2_selectAll__name__[]; -extern "C" -PyObject * pypdffit2_selectAll(PyObject *, PyObject *); - -// selectNone -extern char pypdffit2_selectNone__doc__[]; -extern char pypdffit2_selectNone__name__[]; -extern "C" -PyObject * pypdffit2_selectNone(PyObject *, PyObject *); - -// bond_angle -extern char pypdffit2_bond_angle__doc__[]; -extern char pypdffit2_bond_angle__name__[]; -extern "C" -PyObject * pypdffit2_bond_angle(PyObject *, PyObject *); - -// bond_length_atoms -extern char pypdffit2_bond_length_atoms__doc__[]; -extern char pypdffit2_bond_length_atoms__name__[]; -extern "C" -PyObject * pypdffit2_bond_length_atoms(PyObject *, PyObject *); - -// bond_length_types -extern char pypdffit2_bond_length_types__doc__[]; -extern char pypdffit2_bond_length_types__name__[]; -extern "C" -PyObject * pypdffit2_bond_length_types(PyObject *, PyObject *); - -// get_scat_string -extern char pypdffit2_get_scat_string__doc__[]; -extern char pypdffit2_get_scat_string__name__[]; -extern "C" -PyObject * pypdffit2_get_scat_string(PyObject *, PyObject *); - -// get_scat -extern char pypdffit2_get_scat__doc__[]; -extern char pypdffit2_get_scat__name__[]; -extern "C" -PyObject * pypdffit2_get_scat(PyObject *, PyObject *); - -// set_scat -extern char pypdffit2_set_scat__doc__[]; -extern char pypdffit2_set_scat__name__[]; -extern "C" -PyObject * pypdffit2_set_scat(PyObject *, PyObject *); - -// reset_scat -extern char pypdffit2_reset_scat__doc__[]; -extern char pypdffit2_reset_scat__name__[]; -extern "C" -PyObject * pypdffit2_reset_scat(PyObject *, PyObject *); - -// lat -extern char pypdffit2_lat__doc__[]; -extern char pypdffit2_lat__name__[]; -extern "C" -PyObject * pypdffit2_lat(PyObject *, PyObject *); - -// x -extern char pypdffit2_x__doc__[]; -extern char pypdffit2_x__name__[]; -extern "C" -PyObject * pypdffit2_x(PyObject *, PyObject *); - -// y -extern char pypdffit2_y__doc__[]; -extern char pypdffit2_y__name__[]; -extern "C" -PyObject * pypdffit2_y(PyObject *, PyObject *); - -// z -extern char pypdffit2_z__doc__[]; -extern char pypdffit2_z__name__[]; -extern "C" -PyObject * pypdffit2_z(PyObject *, PyObject *); - -// u11 -extern char pypdffit2_u11__doc__[]; -extern char pypdffit2_u11__name__[]; -extern "C" -PyObject * pypdffit2_u11(PyObject *, PyObject *); - -// u22 -extern char pypdffit2_u22__doc__[]; -extern char pypdffit2_u22__name__[]; -extern "C" -PyObject * pypdffit2_u22(PyObject *, PyObject *); - -// u33 -extern char pypdffit2_u33__doc__[]; -extern char pypdffit2_u33__name__[]; -extern "C" -PyObject * pypdffit2_u33(PyObject *, PyObject *); - -// u12 -extern char pypdffit2_u12__doc__[]; -extern char pypdffit2_u12__name__[]; -extern "C" -PyObject * pypdffit2_u12(PyObject *, PyObject *); - -// u13 -extern char pypdffit2_u13__doc__[]; -extern char pypdffit2_u13__name__[]; -extern "C" -PyObject * pypdffit2_u13(PyObject *, PyObject *); - -// u23 -extern char pypdffit2_u23__doc__[]; -extern char pypdffit2_u23__name__[]; -extern "C" -PyObject * pypdffit2_u23(PyObject *, PyObject *); - -// occ -extern char pypdffit2_occ__doc__[]; -extern char pypdffit2_occ__name__[]; -extern "C" -PyObject * pypdffit2_occ(PyObject *, PyObject *); - -// pscale -extern char pypdffit2_pscale__doc__[]; -extern char pypdffit2_pscale__name__[]; -extern "C" -PyObject * pypdffit2_pscale(PyObject *, PyObject *); - -// spdiameter -extern char pypdffit2_spdiameter__doc__[]; -extern char pypdffit2_spdiameter__name__[]; -extern "C" -PyObject * pypdffit2_spdiameter(PyObject *, PyObject *); - -// stepcut -extern char pypdffit2_stepcut__doc__[]; -extern char pypdffit2_stepcut__name__[]; -extern "C" -PyObject * pypdffit2_stepcut(PyObject *, PyObject *); - -// sratio -extern char pypdffit2_sratio__doc__[]; -extern char pypdffit2_sratio__name__[]; -extern "C" -PyObject * pypdffit2_sratio(PyObject *, PyObject *); - -// delta2 -extern char pypdffit2_delta2__doc__[]; -extern char pypdffit2_delta2__name__[]; -extern "C" -PyObject * pypdffit2_delta2(PyObject *, PyObject *); - -// delta1 -extern char pypdffit2_delta1__doc__[]; -extern char pypdffit2_delta1__name__[]; -extern "C" -PyObject * pypdffit2_delta1(PyObject *, PyObject *); - -// dscale -extern char pypdffit2_dscale__doc__[]; -extern char pypdffit2_dscale__name__[]; -extern "C" -PyObject * pypdffit2_dscale(PyObject *, PyObject *); - -// qdamp -extern char pypdffit2_qdamp__doc__[]; -extern char pypdffit2_qdamp__name__[]; -extern "C" -PyObject * pypdffit2_qdamp(PyObject *, PyObject *); - -// qbroad -extern char pypdffit2_qbroad__doc__[]; -extern char pypdffit2_qbroad__name__[]; -extern "C" -PyObject * pypdffit2_qbroad(PyObject *, PyObject *); - -// rcut -extern char pypdffit2_rcut__doc__[]; -extern char pypdffit2_rcut__name__[]; -extern "C" -PyObject * pypdffit2_rcut(PyObject *, PyObject *); - -// get_atoms -extern char pypdffit2_get_atoms__doc__[]; -extern char pypdffit2_get_atoms__name__[]; -extern "C" -PyObject * pypdffit2_get_atoms(PyObject *, PyObject *); - -// num_atoms -extern char pypdffit2_num_atoms__doc__[]; -extern char pypdffit2_num_atoms__name__[]; -extern "C" -PyObject * pypdffit2_num_atoms(PyObject *, PyObject *); - -// get_atom_types -extern char pypdffit2_get_atom_types__doc__[]; -extern char pypdffit2_get_atom_types__name__[]; -extern "C" -PyObject * pypdffit2_get_atom_types(PyObject *, PyObject *); - -// num_phases -extern char pypdffit2_num_phases__doc__[]; -extern char pypdffit2_num_phases__name__[]; -extern "C" -PyObject * pypdffit2_num_phases(PyObject *, PyObject *); - -// num_datasets -extern char pypdffit2_num_datasets__doc__[]; -extern char pypdffit2_num_datasets__name__[]; -extern "C" -PyObject * pypdffit2_num_datasets(PyObject *, PyObject *); - -// phase_fractions -extern char pypdffit2_phase_fractions__doc__[]; -extern char pypdffit2_phase_fractions__name__[]; -extern "C" -PyObject * pypdffit2_phase_fractions(PyObject *, PyObject *); - -// redirect_stdout -extern char pypdffit2_redirect_stdout__doc__[]; -extern char pypdffit2_redirect_stdout__name__[]; -extern "C" -PyObject * pypdffit2_redirect_stdout(PyObject *, PyObject *); - - -// is_element -extern char pypdffit2_is_element__doc__[]; -extern char pypdffit2_is_element__name__[]; -extern "C" -PyObject * pypdffit2_is_element(PyObject *, PyObject *); - -#endif // PYPDFFIT2_MISC_H diff --git a/src/extensions/pdffit2module/pdffit2module.cc b/src/extensions/pdffit2module/pdffit2module.cc deleted file mode 100644 index efde9511..00000000 --- a/src/extensions/pdffit2module/pdffit2module.cc +++ /dev/null @@ -1,150 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* The python pdffit2 module. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include -#include - -#include "pyexceptions.h" -#include "bindings.h" -#include "../libpdffit2/pdffit.h" - -using namespace std; - -char pypdffit2_module__doc__[] = - "pdffit2 - interface to the core calculation routines in C++"; - -// local helper for transfer version information from -// Python to C++ PdfFit class. - -namespace { - -void transfer_version() -{ - // obtain version information from the Python module - PyObject* mdiffpy_pdffit2; - mdiffpy_pdffit2 = PyImport_ImportModule("diffpy.pdffit2"); - if (!mdiffpy_pdffit2) return; - PyObject* pyversion; - pyversion = PyObject_GetAttrString(mdiffpy_pdffit2, "__version__"); - Py_DECREF(mdiffpy_pdffit2); - if (!pyversion) return; - const char* cversion; -#if PY_MAJOR_VERSION >= 3 - cversion = PyUnicode_AsUTF8(pyversion); -#else - cversion = PyString_AsString(pyversion); -#endif - // copy version information to C++ constant - if (cversion) PdfFit::version(cversion); - Py_DECREF(pyversion); -} - - -void setup_module_contents(PyObject* d) -{ - // install the module exceptions - pypdffit2_runtimeError = PyErr_NewException("pdffit2.runtime", 0, 0); - PyDict_SetItemString(d, "RuntimeException", pypdffit2_runtimeError); - - pypdffit2_unassignedError = PyErr_NewException( - "pdffit2.unassignedError", 0, 0); - PyDict_SetItemString(d, "unassignedError", pypdffit2_unassignedError); - - pypdffit2_dataError = PyErr_NewException( - "pdffit2.dataError", 0, 0); - PyDict_SetItemString(d, "dataError", pypdffit2_dataError); - - pypdffit2_structureError = PyErr_NewException( - "pdffit2.structureError", 0, 0); - PyDict_SetItemString(d, "structureError", pypdffit2_structureError); - - pypdffit2_calculationError = PyErr_NewException( - "pdffit2.calculationError", 0, 0); - PyDict_SetItemString(d, "calculationError", pypdffit2_calculationError); - - pypdffit2_constraintError = PyErr_NewException( - "pdffit2.constraintError", 0, 0); - PyDict_SetItemString(d, "constraintError", pypdffit2_constraintError); - - transfer_version(); -} - -} // namespace ------------------------------------------------------------- - -// TODO remove PY_MAJOR_VERSION blocks after ending support for Python 2.7 - -#if PY_MAJOR_VERSION == 2 - -// Initialization function for the module (*must* be called initpdffit2) -extern "C" -void -initpdffit2() -{ - // create the module and add the functions - PyObject * m = Py_InitModule4( - "pdffit2", pypdffit2_methods, - pypdffit2_module__doc__, 0, PYTHON_API_VERSION); - - // get its dictionary - PyObject * d = PyModule_GetDict(m); - - // check for errors - if (PyErr_Occurred()) { - Py_FatalError("can't initialize module pdffit2"); - } - - // install the module exceptions and version string - setup_module_contents(d); - - return; -} - -#else - -// Module initialization for Python 3 ---------------------------------------- - -static struct PyModuleDef pdffit2moduledef = { - PyModuleDef_HEAD_INIT, - // .m_name = - "pdffit2", - // .m_doc = - pypdffit2_module__doc__, - // .m_size = - -1, - // .m_methods = - pypdffit2_methods, -}; - - -PyMODINIT_FUNC -PyInit_pdffit2(void) - -{ - PyObject *module = PyModule_Create(&pdffit2moduledef); - if (module == NULL) return NULL; - - PyObject* d = PyModule_GetDict(module); - setup_module_contents(d); - return module; -} - -#endif // PY_MAJOR_VERSION == 2 - -// End of file diff --git a/src/extensions/pdffit2module/pyexceptions.cc b/src/extensions/pdffit2module/pyexceptions.cc deleted file mode 100644 index e94b3d16..00000000 --- a/src/extensions/pdffit2module/pyexceptions.cc +++ /dev/null @@ -1,30 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Exceptions for pdffit2 python module. -* -* Comments: -* -***********************************************************************/ -#define PY_SSIZE_T_CLEAN -#include - -PyObject *pypdffit2_runtimeError = 0; -PyObject *pypdffit2_unassignedError = 0; -PyObject *pypdffit2_dataError = 0; -PyObject *pypdffit2_structureError = 0; -PyObject *pypdffit2_calculationError = 0; -PyObject *pypdffit2_constraintError = 0; - -// End of file diff --git a/src/extensions/pdffit2module/pyexceptions.h b/src/extensions/pdffit2module/pyexceptions.h deleted file mode 100644 index 09bd942b..00000000 --- a/src/extensions/pdffit2module/pyexceptions.h +++ /dev/null @@ -1,33 +0,0 @@ -/*********************************************************************** -* -* pdffit2 by DANSE Diffraction group -* Simon J. L. Billinge -* (c) 2006 trustees of the Michigan State University -* All rights reserved. -* -* File coded by: Chris Farrow -* -* See AUTHORS.txt for a list of people who contributed. -* See LICENSE.txt for license information. -* -************************************************************************ -* -* Exceptions for pdffit2 python module. -* -* Comments: -* -***********************************************************************/ - -#ifndef PYPDFFIT2_EXCEPTIONS_H -#define PYPDFFIT2_EXCEPTIONS_H - -// exceptions - -extern PyObject *pypdffit2_runtimeError; -extern PyObject *pypdffit2_unassignedError; -extern PyObject *pypdffit2_dataError; -extern PyObject *pypdffit2_structureError; -extern PyObject *pypdffit2_constraintError; -extern PyObject *pypdffit2_calculationError; - -#endif // PYPDFFIT2_EXCEPTIONS_H diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index 6a142536..00000000 --- a/tests/conftest.py +++ /dev/null @@ -1,50 +0,0 @@ -import io -import json -from pathlib import Path - -import pytest - -import diffpy.pdffit2 -import diffpy.pdffit2.output # assuming this is the correct import path - - -@pytest.fixture -def user_filesystem(tmp_path): - base_dir = Path(tmp_path) - home_dir = base_dir / "home_dir" - home_dir.mkdir(parents=True, exist_ok=True) - cwd_dir = base_dir / "cwd_dir" - cwd_dir.mkdir(parents=True, exist_ok=True) - - home_config_data = {"username": "home_username", "email": "home@email.com"} - with open(home_dir / "diffpyconfig.json", "w") as f: - json.dump(home_config_data, f) - - yield tmp_path - - -@pytest.fixture -def datafile(): - """Fixture to dynamically load any test file.""" - - def _load(filename): - return "tests/testdata/" + filename - - return _load - - -@pytest.fixture -def capture_output(): - """Capture output from pdffit2 engine produced in function call.""" - - def _capture(f, *args, **kwargs): - savestdout = diffpy.pdffit2.output.stdout - fp = io.StringIO() - diffpy.pdffit2.redirect_stdout(fp) - try: - f(*args, **kwargs) - finally: - diffpy.pdffit2.redirect_stdout(savestdout) - return fp.getvalue() - - return _capture diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py deleted file mode 100644 index 58272d92..00000000 --- a/tests/test_exceptions.py +++ /dev/null @@ -1,1075 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# pdffit2 by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farrow -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## - - -import unittest - -import pytest - -from diffpy.pdffit2 import pdffit2 -from diffpy.pdffit2.pdffit import PdfFit - - -class read_structExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_IOError(self): - """Raise IOError when structure file does not exist.""" - self.assertRaises(IOError, self.P.read_struct, "Nofile.stru") - - def test_structureError(self): - """Raise pdffit2.structureError when structure is malformed.""" - self.assertRaises( - pdffit2.structureError, - self.P.read_struct, - self.datafile("badNi.stru"), - ) - - def test_structureErrorZeroVolume(self): - """Raise pdffit2.structureError when unit cell volume is - negative.""" - # I don't know how to test for this, but it's in the library code - self.assertRaises( - pdffit2.structureError, - self.P.read_struct, - self.datafile("badNiZeroVolume.stru"), - ) - - -class read_dataExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_IOError(self): - """Raise IOError when data file does not exist.""" - self.assertRaises( - IOError, self.P.read_data, "Nofile.dat", "X", 25.0, 0.5 - ) - - def test_dataError(self): - """Raise pdffit2.dataError when data has improper spacing.""" - self.assertRaises( - pdffit2.dataError, - self.P.read_data, - self.datafile("badNi.dat"), - "X", - 25.0, - 0.5, - ) - - -class read_data_listsExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.r_data = [0.1, 0.2] - self.Gr_data = [1, 2, 3] - self.qmax = 10 - self.qdamp = 0.5 - - def tearDown(self): - del self.P - - def test_ValueError1(self): - """Raise ValueError when lists are of different length.""" - self.assertRaises( - ValueError, - self.P.read_data_lists, - "X", - self.qmax, - self.qdamp, - self.r_data, - self.Gr_data, - ) - - def test_ValueError2(self): - """Raise ValueError when qmax < 0.""" - self.assertRaises( - ValueError, - self.P.read_data_lists, - "X", - -self.qmax, - self.qdamp, - self.r_data, - self.Gr_data, - ) - - def test_ValueError3(self): - """Raise ValueError when qdamp < 0.""" - self.assertRaises( - ValueError, - self.P.read_data_lists, - "X", - self.qmax, - -self.qdamp, - self.r_data, - self.Gr_data, - ) - - def test_dataError(self): - """Raise pdffit2.dataError when data has improper spacing.""" - r_data = [0.1, 0.52, 0.2] - self.assertRaises( - pdffit2.dataError, - self.P.read_data_lists, - "X", - self.qmax, - self.qdamp, - r_data, - self.Gr_data, - ) - - -class pdfrangeExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.rmin = 4.0 - self.rmax = 10.0 - - def tearDown(self): - del self.P - - def test_ValueError1(self): - """Raise ValueError when iset does not exist.""" - self.assertRaises( - ValueError, self.P.pdfrange, self.iset, self.rmin, self.rmax - ) - - def test_ValueError2(self): - """Raise ValueError when rmax < rmin.""" - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertRaises( - ValueError, self.P.pdfrange, self.iset, self.rmax, self.rmin - ) - - def test_ValueError3(self): - """Raise ValueError when range outside of data.""" - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertRaises( - ValueError, self.P.pdfrange, self.iset, -self.rmin, self.rmax - ) - - -class allocExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.qmax = 25 - self.qdamp = 0.5 - self.rmin = 4.0 - self.rmax = 10.0 - self.bin = 100 - - def tearDown(self): - del self.P - - def test_ValueError1(self): - """Raise ValueError when qmax < 0.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - -self.qmax, - self.qdamp, - self.rmin, - self.rmax, - self.bin, - ) - - def test_ValueError2(self): - """Raise ValueError when qdamp < 0.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - self.qmax, - -self.qdamp, - self.rmin, - self.rmax, - self.bin, - ) - - def test_ValueError3(self): - """Raise ValueError when rmin < 0.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - self.qmax, - self.qdamp, - -self.rmin, - self.rmax, - self.bin, - ) - - def test_ValueError4(self): - """Raise ValueError when rmax < 0.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - self.qmax, - self.qdamp, - self.rmin, - -self.rmax, - self.bin, - ) - - def test_ValueError5(self): - """Raise ValueError when bin < 0.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - self.qmax, - self.qdamp, - self.rmin, - self.rmax, - -self.bin, - ) - - def test_ValueError6(self): - """Raise ValueError when rmax < rmin.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - self.qmax, - self.qdamp, - self.rmax, - self.rmin, - self.bin, - ) - - def test_ValueError7(self): - """Raise ValueError when qdamp < 0.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - ValueError, - self.P.alloc, - "X", - self.qmax, - self.qdamp, - self.rmin, - self.rmax, - -self.bin, - ) - - -class calcExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.P.read_struct(self.datafile("Ni.stru")) - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when no space has been - allocated.""" - self.assertRaises(pdffit2.unassignedError, self.P.calc) - - -# PJ 2006-03-06 -# -# test_calculationError raised exception, because for Qmax=0.5, rmax would -# increase to 4010A and this would throw exception when the size of bnd array -# would exceed MAXBND limit. However, bnd vector can now grow, thus rmax -# is not limited and the following test would hang indefinitely. - -# def test_calculationError(self): -# """raise pdffit2.calculationError when calculation cannot be done""" -# self.P.alloc('X', 0.01, 0.5, 2, 10, 100) -# self.assertRaises(pdffit2.calculationError, self.P.calc) - - -# class refineExceptions(unittest.TestCase): -# I'm not sure how to test these - -# def setUp(self): -# self.P = PdfFit() -# -# def test_calculationError(self): -# """raise pdffit2.calculationError when model pdf can't be calculated""" -# #self.assertRaises(pdffit2.calculationError, self.P.calc) -# -# def test_constraintError(self): -# """raise pdffit2.constraintError for bad constraint(s)""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) - - -# class refine_stepExceptions(unittest.TestCase): -# I'm not sure how to test these - -# def setUp(self): -# self.P = PdfFit() -# -# def test_calculationError(self): -# """raise pdffit2.calculationError when model pdf can't be calculated""" -# #self.assertRaises(pdffit2.calculationError, self.P.calc) -# -# def test_constraintError(self): -# """raise pdffit2.constraintError for bad constraint(s)""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) - - -class save_pdfExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.strufile = "temp.pdf" - - def tearDown(self): - del self.P - - def test_IOError(self): - """Raise IOError when structure cannot be saved.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - self.P.calc() - self.assertRaises( - IOError, self.P.save_pdf, 1, "nodir183160/" + self.strufile - ) - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when structure is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.save_pdf, 1, self.strufile - ) - - -class save_difExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.strufile = "temp.dif" - - def tearDown(self): - del self.P - - def test_IOError(self): - """Raise IOError when dif cannot be saved.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - self.P.calc() - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertRaises( - IOError, self.P.save_dif, 1, "nodir183160/" + self.strufile - ) - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when structure is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.save_dif, 1, self.strufile - ) - - -class save_resExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.resfile = "temp.res" - - def tearDown(self): - del self.P - - def test_IOError(self): - """Raise IOError when residual file cannot be saved.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 30.0, 0.0) - self.P.constrain(self.P.lat(1), 1) - self.P.setpar(1, 3.0) - self.P.pdfrange(1, 2.0, 10.0) - self.P.refine_step() - self.assertRaises( - IOError, self.P.save_res, "nodir183160/" + self.resfile - ) - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when structure is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.save_res, self.resfile - ) - - -class save_structExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - # Same code as show_struct - - def setUp(self): - self.P = PdfFit() - self.strufile = "temp.stru" - - def tearDown(self): - del self.P - - def test_IOError(self): - """Raise IOError when structure cannot be saved.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises( - IOError, self.P.save_struct, 1, "nodir183160/" + self.strufile - ) - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when structure is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.save_struct, 1, self.strufile - ) - - -class constrainExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.par = 1 - return - - def tearDown(self): - self.P = None - return - - def test_constraintError(self): - """Raise constraintError when constraint is bad.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.constrain("x(1)", "junk+@1") - self.P.setpar(1, 0.01) - self.assertRaises(pdffit2.constraintError, self.P.calc) - self.assertRaises(pdffit2.constraintError, self.P.refine) - return - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when variable is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.constrain, self.P.x(1), self.par - ) - return - - def test_ValueError(self): - """Raise ValueError when a variable index does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.constrain, self.P.x(6), self.par) - return - - def test_constrainNonRefVar(self): - "raise constraintError when attempting to constrain non-refinables" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises( - pdffit2.constraintError, self.P.constrain, "rcut", "@7" - ) - self.assertRaises( - pdffit2.constraintError, self.P.constrain, "rcut", 13 - ) - self.assertRaises( - pdffit2.constraintError, self.P.constrain, "stepcut", "@17" - ) - return - - -class setvarExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.val = 3.0 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when variable is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.setvar, self.P.lat(1), self.val - ) - - def test_ValueError(self): - """Raise ValueError when a variable index does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.setvar, self.P.lat(7), self.val) - - -class getvarExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when variable is undefined.""" - self.assertRaises( - pdffit2.unassignedError, self.P.getvar, self.P.pscale() - ) - - def test_ValueError(self): - """Raise ValueError when a variable index does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.getvar, self.P.lat(7)) - - -class getRExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.getR) - - -class getpdf_fitExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.getpdf_fit) - - -class getpdf_obsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.getpdf_obs) - - -class getpdf_diffExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.getpdf_diff) - - -class get_atomsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.get_atoms) - - -class getparExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """Raise pdffit2.unassignedError when parameter does not - exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when parameter does not - exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.constrain(self.P.lat(1), 2) - self.assertRaises(pdffit2.unassignedError, self.P.getpar, 1) - - -class pselExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - self.ip = 1 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - -class pdeselExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.ip = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, self.ip) - - -class selectAtomTypeExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.assertRaises( - pdffit2.unassignedError, - self.P.selectAtomType, - self.iset, - "i", - "Ni", - True, - ) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - # selectAtomType should pass with one phase defined - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAtomType(self.iset, "i", "Ni", True) - self.P.selectAtomType(self.iset, "j", "Ni", False) - # but fail for phase 2 which is not present - self.assertRaises( - pdffit2.unassignedError, self.P.selectAtomType, 2, "i", "Ca", True - ) - - def test_ijcharValueError(self): - """Raise ValueError when ijchar is neither 'i' nor 'j'.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAtomType(self.iset, "i", "Ni", True) - self.P.selectAtomType(self.iset, "j", "Ni", True) - self.assertRaises( - ValueError, self.P.selectAtomType, self.iset, "k", "Ni", True - ) - - -class selectAtomIndexExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.assertRaises( - pdffit2.unassignedError, - self.P.selectAtomIndex, - self.iset, - "i", - self.i, - True, - ) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - # pass for phase 1 - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAtomIndex(self.iset, "i", 1, True) - self.P.selectAtomIndex(self.iset, "i", 2, False) - # fail for phase 2 - self.assertRaises( - pdffit2.unassignedError, self.P.selectAtomIndex, 2, "i", 1, True - ) - - def test_ValueError(self): - """Raise ValueError when selected atom does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises( - ValueError, self.P.selectAtomIndex, self.iset, "i", 6, True - ) - - -class selectAllExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.assertRaises( - pdffit2.unassignedError, self.P.selectAll, self.iset, "i" - ) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - # fail when there is no dataset - self.assertRaises( - pdffit2.unassignedError, self.P.selectAll, self.iset, "i" - ) - # pass with dataset - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectAll(self.iset, "i") - self.P.selectAll(self.iset, "j") - # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "i") - self.assertRaises(pdffit2.unassignedError, self.P.selectAll, 2, "j") - - -class selectNoneExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.iset = 1 - self.i = 1 - - def tearDown(self): - del self.P - - def test_unassignedError1(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.assertRaises( - pdffit2.unassignedError, self.P.selectNone, self.iset, "i" - ) - - def test_unassignedError2(self): - """Raise pdffit2.unassignedError when set does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - # fail when there is no dataset - self.assertRaises( - pdffit2.unassignedError, self.P.selectNone, self.iset, "i" - ) - # pass with dataset - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.selectNone(self.iset, "i") - self.P.selectNone(self.iset, "j") - # fail for phase 2 - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "i") - self.assertRaises(pdffit2.unassignedError, self.P.selectNone, 2, "j") - - -class bangExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.a1 = 1 - self.a2 = 2 - self.a3 = 3 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.assertRaises( - pdffit2.unassignedError, self.P.bang, self.a1, self.a2, self.a3 - ) - - def test_ValueError1(self): - """Raise ValueError when selected atom(s) does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(ValueError, self.P.bang, 0, self.a2, self.a3) - - def test_ValueError2(self): - """Raise ValueError when selected atom(s) does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.bang, self.a1, -1, self.a3) - - def test_ValueError3(self): - """Raise ValueError when selected atom(s) does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.bang, self.a1, self.a2, 6) - - -class blenExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.a1 = 1 - self.a2 = 2 - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when no data exists.""" - self.assertRaises( - pdffit2.unassignedError, self.P.blen, self.a1, self.a2 - ) - - def test_ValueError1(self): - """Raise ValueError when selected atom(s) does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.blen, 0, self.a2) - - def test_ValueError2(self): - """Raise ValueError when selected atom(s) does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.blen, self.a1, 6) - - def test_ValueError3(self): - """Raise ValueError when selected atom(s) does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertRaises(ValueError, self.P.blen, 0, 6) - - -class show_scatExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.show_scat, "X") - - -# class set_scatExceptions(unittest.TestCase): -# I'm not sure how to use this function - -# def setUp(self): -# self.P = PdfFit() -# -# def test_unassignedError1(self): -# """raise pdffit2.unassignedError when phase does not exist""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) -# -# def test_unassignedError2(self): -# """raise pdffit2.unassignedError when phase does not exist""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) -# -# def test_ValueError(self): -# """raise pdffit2.unassignedError when selected atom does not exist""" -# #self.assertRaises(pdffit2.constraintError, self.P.calc) - - -class num_atomsExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when no atoms exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.num_atoms) - - -class fixparExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when parameter does not - exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.fixpar, 1) - - -class freeparExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when parameter does not - exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.freepar, 1) - - -class setphaseExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when phase does not exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.setphase, 2) - - -class setdataExceptions(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data set does not - exist.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.assertRaises(pdffit2.unassignedError, self.P.setdata, 2) - - -class getcrwExceptions(unittest.TestCase): - def setUp(self): - self.P = PdfFit() - - def tearDown(self): - del self.P - - def test_unassignedError(self): - """Raise pdffit2.unassignedError when data does not exist.""" - self.assertRaises(pdffit2.unassignedError, self.P.getcrw) - - -# main -if __name__ == "__main__": - # suite = unittest.makeSuite(num_atomsExceptions) - # unittest.TextTestRunner(verbosity=3).run(suite) - # testcase = calcExceptions('test_unassignedError') - # unittest.TextTestRunner(verbosity=3).run(testcase) - unittest.main() - -# End of file diff --git a/tests/test_pdffit.py b/tests/test_pdffit.py deleted file mode 100644 index e6823da7..00000000 --- a/tests/test_pdffit.py +++ /dev/null @@ -1,783 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for PdfFit.py.""" - -import unittest - -import pytest - -from diffpy.pdffit2 import pdffit2 -from diffpy.pdffit2.pdffit import PdfFit -from diffpy.structure import loadStructure - -# ---------------------------------------------------------------------------- - - -class TestPdfFit(unittest.TestCase): - places = 6 - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile, capture_output): - self.datafile = datafile - self.capture_output = capture_output - - def setUp(self): - self.P = PdfFit() - return - - def tearDown(self): - del self.P - return - - def test__exportAll(self): - "check PdfFit._exportAll()" - ns = {} - self.P._exportAll(ns) - self.assertEqual("ALL", ns["ALL"]) - self.assertEqual("FSQR", ns["FSQR"]) - self.assertEqual("N", ns["N"]) - self.assertIs("N", ns["N"]) - self.assertIs(self.P.lat, ns["lat"]) - self.assertEqual(self.P.reset, ns["reset"]) - return - - # def test_intro(self): - # """check PdfFit.intro() - # """ - # return - - def test_add_structure(self): - """Check PdfFit.add_structure()""" - ni = loadStructure(self.datafile("Ni.stru")) - self.P.add_structure(ni) - self.assertEqual(4, self.P.num_atoms()) - return - - # def test_read_struct(self): - # """check PdfFit.read_struct() - # """ - # return - # - # def test_read_struct_string(self): - # """check PdfFit.read_struct_string() - # """ - # return - # - # def test_read_data(self): - # """check PdfFit.read_data() - # """ - # return - - def test_read_data_string(self): - """Check PdfFit.read_data_string()""" - pf = self.P - with open(self.datafile("300K.gr")) as fp: - s = fp.read() - self.assertEqual([], pf.data_files) - pf.read_data_string(s, "N", 32, 0.03, "lmo") - self.assertEqual(1, len(pf.data_files)) - gobs = pf.getpdf_obs() - self.assertEqual(2000, len(gobs)) - self.assertEqual(0.384, gobs[-1]) - self.assertEqual(0.03, pf.getvar("qdamp")) - return - - # def test_read_data_lists(self): - # """check PdfFit.read_data_lists() - # """ - # return - # - # def test_pdfrange(self): - # """check PdfFit.pdfrange() - # """ - # return - # - # def test_reset(self): - # """check PdfFit.reset() - # """ - # return - - def test_alloc(self): - """Check PdfFit.alloc()""" - # alloc and read_struct can be called in any order. - self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) - # without a structure calculated PDF is all zero - self.P.calc() - Gzero = self.P.getpdf_fit() - self.assertEqual(1000 * [0.0], Gzero) - self.P.read_struct(self.datafile("Ni.stru")) - self.P.calc() - # check r-values - r = self.P.getR() - self.assertEqual(1000, len(r)) - for i in range(1000): - self.assertAlmostEqual(0.01 * (i + 1), r[i], self.places) - Gfit_alloc_read = self.P.getpdf_fit() - # now try the other order - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 25, 0.0, 0.01, 10, 1000) - self.P.calc() - Gfit_read_alloc = self.P.getpdf_fit() - # and they should be the same - self.assertEqual(Gfit_read_alloc, Gfit_alloc_read) - return - - # def test_calc(self): - # """check PdfFit.calc() - # """ - # return - # - # def test_refine(self): - # """check PdfFit.refine() - # """ - # return - # - # def test_refine_step(self): - # """check PdfFit.refine_step() - # """ - # return - # - # def test_save_pdf(self): - # """check PdfFit.save_pdf() - # """ - # return - # - # def test_save_pdf_string(self): - # """check PdfFit.save_pdf_string() - # """ - # return - # - # def test_save_dif(self): - # """check PdfFit.save_dif() - # """ - # return - # - # def test_save_dif_string(self): - # """check PdfFit.save_dif_string() - # """ - # return - # - # def test_save_res(self): - # """check PdfFit.save_res() - # """ - # return - # - # def test_save_res_string(self): - # """check PdfFit.save_res_string() - # """ - # return - - def test_get_structure(self): - """Check PdfFit.get_structure()""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - stru1 = self.P.get_structure(1) - self.assertEqual(4, len(stru1)) - self.assertEqual("Ni", stru1[0].element) - stru2 = self.P.get_structure(2) - self.assertEqual(56, len(stru2)) - self.assertEqual("Ti", stru2[-1].element) - return - - # def test_save_struct(self): - # """check PdfFit.save_struct() - # """ - # return - # - # def test_save_struct_string(self): - # """check PdfFit.save_struct_string() - # """ - # return - # - # def test_show_struct(self): - # """check PdfFit.show_struct() - # """ - # return - # - # def test_constrain(self): - # """check PdfFit.constrain() - # """ - # return - - def test_setpar(self): - """Check PdfFit.setpar()""" - pf = self.P - pf.read_struct(self.datafile("Ni.stru")) - pf.setpar(1, "lat(1)") - self.assertEqual(3.52, pf.getpar(1)) - pf.setpar(1, 4.0) - self.assertEqual(4, pf.getpar(1)) - pf.setpar(1, pf.lat("a")) - self.assertEqual(3.52, pf.getpar(1)) - return - - def test_setvar(self): - """Check PdfFit.setvar()""" - pf = self.P - pf.read_struct(self.datafile("Ni.stru")) - pf.setvar(pf.delta1, 1.2) - self.assertEqual(1.2, pf.getvar(pf.delta1)) - pf.setvar("delta1", 1.7) - self.assertEqual(1.7, pf.getvar("delta1")) - return - - # def test_getvar(self): - # """check PdfFit.getvar() - # """ - # return - # - # def test_getrw(self): - # """check PdfFit.getrw() - # """ - # return - # - # def test_getR(self): - # """check PdfFit.getR() - # """ - # return - # - # def test_getpdf_fit(self): - # """check PdfFit.getpdf_fit() - # """ - # return - # - # def test_getpdf_obs(self): - # """check PdfFit.getpdf_obs() - # """ - # return - # - # def test_getpdf_diff(self): - # """check PdfFit.getpdf_diff() - # """ - # return - - def test_get_atoms(self): - """Check PdfFit.get_atoms()""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.setphase(1) - a1 = self.P.get_atoms() - a2 = self.P.get_atoms(2) - self.assertEqual(4 * ["NI"], a1) - self.assertEqual( - 8 * ["PB"] + 24 * ["O"] + 8 * ["SC"] + 8 * ["W"] + 8 * ["TI"], a2 - ) - return - - def test_get_atom_types(self): - """Check PdfFit.get_atom_types()""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.setphase(1) - atp1 = self.P.get_atom_types() - atp2 = self.P.get_atom_types(2) - self.assertEqual(["NI"], atp1) - self.assertEqual(["PB", "O", "SC", "W", "TI"], atp2) - return - - def test_num_phases(self): - """Check PdfFit.num_phases()""" - self.assertEqual(0, self.P.num_phases()) - self.P.read_struct(self.datafile("Ni.stru")) - self.assertEqual(1, self.P.num_phases()) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.assertEqual(2, self.P.num_phases()) - self.P.reset() - self.assertEqual(0, self.P.num_phases()) - return - - def test_num_datasets(self): - """Check PdfFit.num_datasets()""" - self.assertEqual(0, self.P.num_datasets()) - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.5) - self.assertEqual(1, self.P.num_datasets()) - # failed data should not increase num_datasets - try: - self.P.read_data(self.datafile("badNi.dat")) - except (RuntimeError, TypeError, NameError, ValueError, IOError): - pass - self.assertEqual(1, self.P.num_datasets()) - # alloc should increase number of datasets - # alloc requires a loaded structure - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - self.assertEqual(2, self.P.num_datasets()) - self.P.reset() - self.assertEqual(0, self.P.num_datasets()) - return - - def test_getcrw(self): - """Check PdfFit.getcrw()""" - import numpy - - self.assertEqual(0, self.P.num_datasets()) - # Setting qmax=0 so that partial crw are not disturbed by - # termination ripples. - self.P.read_data(self.datafile("Ni.dat"), "X", 0.0, 0.0) - # crw is empty before data refinement - self.assertEqual([], self.P.getcrw()) - self.P.read_struct(self.datafile("Ni.stru")) - self.P.pdfrange(1, 2, 19) - self.P.refine() - crw19 = numpy.array(self.P.getcrw()) - self.assertTrue(numpy.all(crw19 >= 0.0)) - # check that crw19 is non decreasing - self.assertTrue(numpy.all(numpy.diff(crw19) >= 0.0)) - # check that crw19 and getrw give the same value - rw19 = crw19[-1] - self.assertAlmostEqual(self.P.getrw(), rw19, self.places) - # renormalize cumulative Rw and compare with Rw at r=15 - Gobs19 = numpy.array(self.P.getpdf_obs()) - Gnorm19 = numpy.sqrt(numpy.sum(Gobs19**2)) - r = numpy.array(self.P.getR()) - idx = numpy.nonzero(r <= 15)[0] - Gnorm15 = numpy.sqrt(numpy.sum(Gobs19[idx] ** 2)) - i15 = idx[-1] - rw15 = crw19[i15] * Gnorm19 / Gnorm15 - self.P.pdfrange(1, 2, r[i15] + 1e-5) - self.P.refine() - self.assertAlmostEqual(self.P.getrw(), rw15, self.places) - return - - def test_getcrw_two_datasets(self): - """Check that getcrw() and getrw() are consistent for two - datasets.""" - self.P.read_data(self.datafile("Ni.dat"), "X", 25.0, 0.0) - self.P.pdfrange(1, 2, 8) - self.P.read_data(self.datafile("300K.gr"), "N", 32.0, 0.0) - self.P.pdfrange(2, 1, 11) - self.P.read_struct(self.datafile("Ni.stru")) - # mess lattice parameters to have comparable Rw contributions - self.P.setvar("lat(1)", 3) - self.P.setvar("lat(2)", 3) - self.P.setvar("lat(3)", 3) - self.P.refine() - rwtot = self.P.getrw() - self.assertTrue(rwtot > 0.0) - self.P.setdata(1) - rw1 = self.P.getcrw()[-1] - self.P.setdata(2) - rw2 = self.P.getcrw()[-1] - self.assertAlmostEqual(rwtot**2, rw1**2 + rw2**2, self.places) - return - - # def test_getpar(self): - # """check PdfFit.getpar() - # """ - # return - - def test_fixpar(self): - """Check PdfFit.fixpar()""" - self.P.fixpar("all") - self.assertRaises(TypeError, self.P.fixpar, "x") - return - - def test_freepar(self): - """Check PdfFit.freepar()""" - self.P.freepar("all") - self.assertRaises(TypeError, self.P.freepar, "x") - return - - # def test_setphase(self): - # """check PdfFit.setphase() - # """ - # return - # - # def test_setdata(self): - # """check PdfFit.setdata() - # """ - # return - # - def test_psel(self): - """Check PdfFit.psel()""" - - def doalloc(): - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - return - - self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.psel, 1) - self.P.read_struct(self.datafile("Ni.stru")) - doalloc() - self.P.calc() - G1 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - doalloc() - self.P.calc() - G2 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - doalloc() - self.P.pdesel("ALL") - self.P.psel(1) - self.P.calc() - self.assertEqual(G1, self.P.getpdf_fit()) - self.P.pdesel("ALL") - self.P.psel(2) - self.P.calc() - self.assertEqual(G2, self.P.getpdf_fit()) - self.P.psel("ALL") - self.P.calc() - Gall = self.P.getpdf_fit() - dGmax = max( - [abs(g1 + g2 - gall) for g1, g2, gall in zip(G1, G2, Gall)] - ) - self.assertAlmostEqual(0, dGmax, self.places) - self.assertRaises(pdffit2.unassignedError, self.P.psel, 10) - self.assertRaises(pdffit2.unassignedError, self.P.psel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.psel, -100) - return - - def test_pdesel(self): - """Check PdfFit.pdesel()""" - - def doalloc(): - self.P.alloc("X", 30.0, 0.05, 2, 10, 100) - return - - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 1) - self.P.read_struct(self.datafile("Ni.stru")) - doalloc() - self.P.calc() - G1 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - doalloc() - self.P.calc() - G2 = self.P.getpdf_fit() - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - doalloc() - self.P.psel("ALL") - self.P.pdesel(2) - self.P.calc() - self.assertEqual(G1, self.P.getpdf_fit()) - self.P.psel("ALL") - self.P.pdesel(1) - self.P.calc() - self.assertEqual(G2, self.P.getpdf_fit()) - self.P.pdesel("ALL") - self.P.calc() - G0 = self.P.getpdf_fit() - self.assertEqual([0.0] * len(G0), G0) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 10) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, 0) - self.assertRaises(pdffit2.unassignedError, self.P.pdesel, -100) - return - - # - # def test_selectAtomType(self): - # """check PdfFit.selectAtomType() - # """ - # return - # - # def test_selectAtomIndex(self): - # """check PdfFit.selectAtomIndex() - # """ - # return - # - # def test_selectAll(self): - # """check PdfFit.selectAll() - # """ - # return - # - # def test_selectNone(self): - # """check PdfFit.selectNone() - # """ - # return - - def test_bond_angle(self): - """Check PdfFit.bond_angle()""" - self.P.read_struct(self.datafile("Ni.stru")) - a, e = self.P.bond_angle(1, 2, 3) - self.assertAlmostEqual(60.0, a, self.places) - self.assertRaises(ValueError, self.P.bond_angle, 0, 1, 2) - self.assertRaises(ValueError, self.P.bond_angle, 1, 2, 7) - return - - def test_bang(self): - "check PdfFit.bang() function" - self.P.read_struct(self.datafile("Ni.stru")) - out = self.capture_output(self.P.bang, 1, 2, 3).strip() - self.assertTrue(out.endswith("60 degrees")) - self.assertTrue(out.startswith("NI (#1) - NI (#2) - NI (#3)")) - return - - def test_bond_length_atoms(self): - """Check PdfFit.bond_length_atoms()""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - dij, ddij = self.P.bond_length_atoms(1, 5) - self.assertAlmostEqual(4.03635, dij, self.places) - self.P.setphase(1) - self.assertRaises(ValueError, self.P.bond_length_atoms, 1, 5) - return - - def test_bond_length_types(self): - """Check PdfFit.bond_length_types()""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - dPbO = self.P.bond_length_types("Pb", "O", 0.1, 3.0) - # check if keys are present - self.assertTrue("dij" in dPbO) - self.assertTrue("ddij" in dPbO) - self.assertTrue("ij0" in dPbO) - self.assertTrue("ij1" in dPbO) - # check if they have the same length - npts = len(dPbO["dij"]) - self.assertEqual(npts, len(dPbO["ddij"])) - self.assertEqual(npts, len(dPbO["ij0"])) - self.assertEqual(npts, len(dPbO["ij1"])) - # 8 Pb atoms have coordination 12 in perovskite structure - self.assertEqual(8 * 12, len(dPbO["dij"])) - self.P.setphase(1) - dfcc = self.P.bond_length_types("ALL", "ALL", 0.1, 2.6) - # 4 Ni atoms with coordination 12 - self.assertEqual(4 * 12, len(dfcc["dij"])) - # invalid element - self.assertRaises( - ValueError, self.P.bond_length_types, "Ni", "Nix", 0.1, 5.0 - ) - # check indices ij0 - allij0 = sum(dfcc["ij0"], tuple()) - self.assertEqual(0, min(allij0)) - self.assertEqual(3, max(allij0)) - # check indices ij1 - allij1 = sum(dfcc["ij1"], tuple()) - self.assertEqual(1, min(allij1)) - self.assertEqual(4, max(allij1)) - # check index values - ij0check = [(i1 - 1, j1 - 1) for i1, j1 in dfcc["ij1"]] - self.assertEqual(ij0check, dfcc["ij0"]) - # test valid element which is not present in the structure - dnone = self.P.bond_length_types("Ni", "Au", 0.1, 5.0) - self.assertEqual(0, len(dnone["dij"])) - self.assertEqual(0, len(dnone["ddij"])) - self.assertEqual(0, len(dnone["ij0"])) - self.assertEqual(0, len(dnone["ij1"])) - return - - def test_blen(self): - """Check PdfFit.blen()""" - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - blen = self.P.blen - o = self.capture_output(blen, 1, 5).strip() - self.assertTrue(o.endswith("4.03635 A")) - self.assertTrue("PB (#1)" in o) - self.assertTrue("PB (#5)" in o) - self.assertRaises(ValueError, blen, 1, 99) - self.assertRaises(ValueError, blen, 0, 1) - o1 = self.capture_output(blen, 1, 1, 0.1, 1) - self.assertTrue("No pairs found" in o1) - o2 = self.capture_output(blen, 1, 50, 0.1, 1) - self.assertEqual("", o2) - o3 = self.capture_output(blen, "Sc", "O", 0.5, 2.3).strip() - self.assertEqual(1 + 48, len(o3.split("\n"))) - self.assertEqual(6, o3.count("SC (#33)")) - self.assertEqual(2, o3.count("O (#9)")) - self.assertRaises(TypeError, blen, "Sc", "O", 0.5) - return - - # def test_show_scat(self): - # """check PdfFit.show_scat() - # """ - # return - # - # def test_get_scat_string(self): - # """check PdfFit.get_scat_string() - # """ - # return - - def test_get_scat(self): - """Check PdfFit.get_scat()""" - # x-ray scattering factors - fPb = self.P.get_scat("X", "Pb") - self.assertEqual(82.0, fPb) - fTi = self.P.get_scat("X", "tI") - self.assertEqual(22.0, fTi) - # neutron scattering lengths - bPb = self.P.get_scat("N", "PB") - self.assertAlmostEqual(9.401, bPb, 3) - bTi = self.P.get_scat("N", "ti") - self.assertAlmostEqual(-3.370, bTi, 3) - # exceptions - self.assertRaises(ValueError, self.P.get_scat, "N", "zz") - self.assertRaises(ValueError, self.P.get_scat, "Z", "Ti") - return - - def test_set_scat(self): - """Check PdfFit.set_scat()""" - # raises exception when no phase exists - self.assertRaises( - pdffit2.unassignedError, self.P.set_scat, "N", "Ti", -11 - ) - # check if it is local to phase - fPb = self.P.get_scat("X", "Pb") - bPb = self.P.get_scat("N", "Pb") - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.set_scat("X", "Pb", 142) - self.assertEqual(142, self.P.get_scat("X", "Pb")) - self.assertEqual(bPb, self.P.get_scat("N", "Pb")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.assertEqual(fPb, self.P.get_scat("X", "Pb")) - self.P.setphase(1) - self.assertEqual(142, self.P.get_scat("X", "Pb")) - self.P.setphase(2) - self.assertEqual(fPb, self.P.get_scat("X", "Pb")) - # check exception for invalid inputs - self.assertRaises(ValueError, self.P.set_scat, "Z", "C", 123) - self.assertRaises(ValueError, self.P.set_scat, "X", "ZZ", 123) - return - - def test_reset_scat(self): - """Check PdfFit.reset_scat()""" - # raises exception when no phase exists - self.assertRaises(pdffit2.unassignedError, self.P.reset_scat, "Ti") - # check if it is local to phase - fPb = self.P.get_scat("X", "Pb") - bPb = self.P.get_scat("N", "Pb") - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.set_scat("X", "Pb", 142) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.set_scat("N", "Pb", -17) - self.P.setphase(1) - self.assertNotEqual(fPb, self.P.get_scat("X", "Pb")) - self.P.reset_scat("Pb") - self.assertEqual(fPb, self.P.get_scat("X", "Pb")) - self.P.setphase(2) - self.assertNotEqual(bPb, self.P.get_scat("N", "Pb")) - self.P.reset_scat("Pb") - self.assertEqual(bPb, self.P.get_scat("N", "Pb")) - # check exception for invalid inputs - self.assertRaises(ValueError, self.P.reset_scat, "Zz") - return - - def test_num_atoms(self): - """Check PdfFit.num_atoms()""" - self.P.read_struct(self.datafile("Ni.stru")) - self.assertEqual(4, self.P.num_atoms()) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.assertEqual(56, self.P.num_atoms()) - self.P.setphase(1) - self.assertEqual(4, self.P.num_atoms()) - self.P.setphase(2) - self.assertEqual(56, self.P.num_atoms()) - return - - def test_lat(self): - """Check PdfFit.lat()""" - pf = self.P - pf.read_struct(self.datafile("Ni.stru")) - for i in ("a", "b", "c", 1, 2, 3): - self.assertEqual(3.52, pf.getvar(pf.lat(i))) - for i in ("alpha", "beta", "gamma", 4, 5, 6): - self.assertEqual(90, pf.getvar(pf.lat(i))) - return - - def test_xyz(self): - """Check PdfFit.x() PdfFit.y(), PdfFit.z()""" - pf = self.P - pf.read_struct(self.datafile("Ni.stru")) - self.assertEqual(0.5, pf.getvar(pf.x(3))) - self.assertEqual(0, pf.getvar(pf.y(3))) - self.assertEqual(0.5, pf.getvar(pf.z(3))) - return - - def test_uij(self): - """Check PdfFit.uij()""" - ni = loadStructure(self.datafile("Ni.stru")) - ni[2].anisotropy = True - ni[2].U11, ni[2].U22, ni[2].U33 = 1, 2, 3 - ni[2].U12, ni[2].U13, ni[2].U23 = 4, 5, 6 - pf = self.P - pf.add_structure(ni) - self.assertEqual(1, pf.getvar(pf.u11(3))) - self.assertEqual(2, pf.getvar(pf.u22(3))) - self.assertEqual(3, pf.getvar(pf.u33(3))) - self.assertEqual(4, pf.getvar(pf.u12(3))) - self.assertEqual(5, pf.getvar(pf.u13(3))) - self.assertEqual(6, pf.getvar(pf.u23(3))) - return - - def test_occ(self): - """Check PdfFit.occ()""" - pf = self.P - pf.read_struct(self.datafile("Ni.stru")) - for i in range(1, 5): - self.assertEqual(1, pf.getvar(pf.occ(i))) - return - - # def test_pscale(self): - # """check PdfFit.pscale() - # """ - # return - # - # def test_pscale(self): - # """check PdfFit.pscale() - # """ - # return - # - # def test_sratio(self): - # """check PdfFit.sratio() - # """ - # return - # - # def test_delta1(self): - # """check PdfFit.delta1() - # """ - # return - # - # def test_delta2(self): - # """check PdfFit.delta2() - # """ - # return - # - # def test_dscale(self): - # """check PdfFit.dscale() - # """ - # return - # - # def test_qdamp(self): - # """check PdfFit.qdamp() - # """ - # return - # - # def test_qbroad(self): - # """check PdfFit.qbroad() - # """ - # return - # - # def test_rcut(self): - # """check PdfFit.rcut() - # """ - # return - # - - def test___init__(self): - """Check PdfFit.__init__()""" - output_true = self.capture_output(PdfFit, create_intro=True).strip() - output_false = self.capture_output(PdfFit, create_intro=False).strip() - - self.assertGreater(len(output_true), 0) - self.assertEqual(len(output_false), 0) - - return - - -# -# def test__PdfFit__getRef(self): -# """check PdfFit._PdfFit__getRef() -# """ -# return - -# End of class TestPdfFit - -if __name__ == "__main__": - unittest.main() - -# End of file diff --git a/tests/test_phase_fractions.py b/tests/test_phase_fractions.py deleted file mode 100644 index c86961e4..00000000 --- a/tests/test_phase_fractions.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for phase fraction calculations.""" - -import unittest - -import pytest - -from diffpy.pdffit2.pdffit import PdfFit - - -############################################################################## -class TestPhaseFractions(unittest.TestCase): - places = 4 - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.alloc("N", 0.0, 0.05, 0.1, 10, 200) - return - - def tearDown(self): - del self.P - return - - def test_xray_fractions(self): - """test_xray_fractions -- check phase fractions in x-ray dataset.""" - self.P.setdata(1) - ph = self.P.phase_fractions() - bb1 = 28**2 - bb2 = ((8 * 82 + 24 * 8 + 4 * 21 + 2 * 74 + 2 * 22) / 40.0) ** 2 - self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) - self.assertAlmostEqual( - bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places - ) - self.assertAlmostEqual( - bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places - ) - mavg1 = 58.69 - mavg2 = ( - 8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90 - ) / 40.0 - self.assertAlmostEqual( - bb2 / bb1 * mavg1 / mavg2, - ph["mass"][0] / ph["mass"][1], - self.places, - ) - self.assertEqual(0.0, sum(ph["stdatom"])) - self.assertEqual(0.0, sum(ph["stdcell"])) - self.assertEqual(0.0, sum(ph["stdmass"])) - self.P.setphase(1) - self.P.setvar("pscale", 2.0) - ph2 = self.P.phase_fractions() - self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) - self.assertAlmostEqual( - 2.0, - ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), - self.places, - ) - self.assertAlmostEqual( - 2.0, - ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), - self.places, - ) - self.assertAlmostEqual( - 2.0, - ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), - self.places, - ) - return - - def test_neutron_fractions(self): - """test_neutron_fractions -- check phase fractions in neutron dataset.""" - self.P.setdata(2) - ph = self.P.phase_fractions() - bb1 = 10.31**2 - bPb = 9.4012 - bO = 5.8054 - bSc = 12.11 - bW = 4.75518 - bTi = -3.37013 - bb2 = ((8 * bPb + 24 * bO + 4 * bSc + 2 * bW + 2 * bTi) / 40.0) ** 2 - self.assertAlmostEqual(1.0, sum(ph["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph["mass"]), self.places) - self.assertAlmostEqual( - bb2 / bb1, ph["atom"][0] / ph["atom"][1], self.places - ) - self.assertAlmostEqual( - bb2 / bb1 * 40.0 / 4.0, ph["cell"][0] / ph["cell"][1], self.places - ) - mavg1 = 58.69 - mavg2 = ( - 8 * 207.19 + 24 * 15.994 + 4 * 44.956 + 2 * 183.85 + 2 * 47.90 - ) / 40.0 - self.assertAlmostEqual( - bb2 / bb1 * mavg1 / mavg2, - ph["mass"][0] / ph["mass"][1], - self.places, - ) - self.assertEqual(0.0, sum(ph["stdatom"])) - self.assertEqual(0.0, sum(ph["stdcell"])) - self.assertEqual(0.0, sum(ph["stdmass"])) - self.P.setphase(1) - self.P.setvar("pscale", 2.0) - ph2 = self.P.phase_fractions() - self.assertAlmostEqual(1.0, sum(ph2["atom"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["cell"]), self.places) - self.assertAlmostEqual(1.0, sum(ph2["mass"]), self.places) - self.assertAlmostEqual( - 2.0, - ph2["atom"][0] / ph2["atom"][1] / (ph["atom"][0] / ph["atom"][1]), - self.places, - ) - self.assertAlmostEqual( - 2.0, - ph2["cell"][0] / ph2["cell"][1] / (ph["cell"][0] / ph["cell"][1]), - self.places, - ) - self.assertAlmostEqual( - 2.0, - ph2["mass"][0] / ph2["mass"][1] / (ph["mass"][0] / ph["mass"][1]), - self.places, - ) - return - - -# End of class TestSphereEnvelope - -if __name__ == "__main__": - unittest.main() - -# End of file diff --git a/tests/test_shape_factors.py b/tests/test_shape_factors.py deleted file mode 100644 index ee61c9ac..00000000 --- a/tests/test_shape_factors.py +++ /dev/null @@ -1,290 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for particle shape envelope factors.""" - - -import unittest - -import numpy -import pytest - -from diffpy.pdffit2 import pdffit2 -from diffpy.pdffit2.pdffit import PdfFit - - -def spherefactor(r, d): - """Calculate spherical envelope correction. - - r -- PDF radius - d -- diameter of spherical particle - - Return numpy array of shape correction envelope. - """ - r1 = numpy.array(r) - fsph = 1.0 - 1.5 * r1 / d + 0.5 * (r1 / d) ** 3 - fsph[r1 > d] = 0.0 - return fsph - - -############################################################################## -class TestSphereEnvelope(unittest.TestCase): - - places = 6 - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.P = PdfFit() - return - - def tearDown(self): - self.P = None - return - - def test_calculation(self): - """Check calculation of sphere envelope factor.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.calc() - d = 8.0 - r = numpy.array(self.P.getR()) - G0 = numpy.array(self.P.getpdf_fit()) - self.P.setvar("spdiameter", d) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - dG = G0 * spherefactor(r, d) - G1 - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - return - - def test_refinement(self): - """Check refinement of sphere envelope factor.""" - dcheck = 8.0 - dstart = 12.0 - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", dcheck) - self.P.calc() - r = numpy.array(self.P.getR()) - Gd8 = numpy.array(self.P.getpdf_fit()) - Gd8noise = Gd8 - Gd8noise[::2] += 0.01 - Gd8noise[1::2] -= 0.01 - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gd8noise)) - self.P.constrain("spdiameter", "@8") - self.P.setpar(8, dstart) - self.P.refine() - dfinal = self.P.getvar("spdiameter") - self.assertAlmostEqual(dcheck, dfinal, 3) - return - - def test_twophase_calculation(self): - """Check PDF calculation for 2 phases with different - spdiameters.""" - d1 = 6 - d2 = 9 - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", d1) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", d2) - self.P.calc() - G2 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setphase(1) - self.P.setvar("spdiameter", d1) - self.P.setphase(2) - self.P.setvar("spdiameter", d2) - self.P.calc() - Gtot = numpy.array(self.P.getpdf_fit()) - dG = G1 + G2 - Gtot - r = numpy.array(self.P.getR()) - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - return - - def test_twophase_refinement(self): - """Check PDF refinement of 2 phases that have different - spdiameter.""" - dcheck1 = 8.0 - dstart1 = 8.2 - dcheck2 = 6.0 - dstart2 = 5.5 - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", dcheck1) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("spdiameter", dcheck2) - self.P.calc() - G2 = numpy.array(self.P.getpdf_fit()) - r = numpy.array(self.P.getR()) - Gnoise = G1 + G2 - Gnoise[::2] += 0.01 - Gnoise[1::2] -= 0.01 - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.read_data_lists("X", 0.0, 0.05, list(r), list(Gnoise)) - self.P.setphase(1) - self.P.constrain("spdiameter", "@11") - self.P.setphase(2) - self.P.constrain("spdiameter", "@12") - self.P.setpar(11, dstart1) - self.P.setpar(12, dstart2) - self.P.refine() - dfinal2 = self.P.getvar("spdiameter") - self.P.setphase(1) - dfinal1 = self.P.getvar("spdiameter") - self.assertAlmostEqual(dcheck1, dfinal1, 3) - self.assertAlmostEqual(dcheck2, dfinal2, 3) - return - - def test_spdiameter_io(self): - """Check reading and writing of spdiameter from structure - file.""" - import re - - self.P.read_struct(self.datafile("Ni.stru")) - self.assertEqual(0.0, self.P.getvar("spdiameter")) - # engine should not write shape factor when not defined - spdnone = self.P.save_struct_string(1) - self.assertTrue(not re.search("(?m)^shape +sphere,", spdnone)) - self.P.setvar("spdiameter", 7) - spd7 = self.P.save_struct_string(1) - # spd7 should contain shape factor data - self.assertTrue(re.search("(?m)^shape +sphere,", spd7)) - self.P.reset() - self.P.read_struct_string(spd7) - self.assertEqual(7.0, self.P.getvar("spdiameter")) - # try to read without comma - spd14 = re.sub("(?m)^shape +sphere.*$", "shape sphere 14.00", spd7) - self.P.read_struct_string(spd14) - self.assertEqual(14.0, self.P.getvar("spdiameter")) - # try to read invalid shape data - sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", spd7) - self.assertRaises( - pdffit2.structureError, self.P.read_struct_string, sinvalid - ) - return - - -# End of class TestSphereEnvelope - - -############################################################################## -class TestStepCutEnvelope(unittest.TestCase): - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - places = 6 - - def setUp(self): - self.P = PdfFit() - return - - def tearDown(self): - self.P = None - return - - def test_stepcut_calculation(self): - """Check calculation of sphere envelope factor.""" - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.calc() - stepcut = 8.0 - r = numpy.array(self.P.getR()) - G0 = numpy.array(self.P.getpdf_fit()) - G0[r > stepcut] = 0.0 - self.P.setvar("stepcut", stepcut) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - dG = G0 - G1 - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - return - - def test_twophase_stepcut_calculation(self): - """Check PDF calculation for 2 phases with different - spdiameters.""" - d1 = 6 - d2 = 9 - self.P.read_struct(self.datafile("Ni.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("stepcut", d1) - self.P.calc() - G1 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setvar("stepcut", d2) - self.P.calc() - G2 = numpy.array(self.P.getpdf_fit()) - self.P.reset() - self.P.read_struct(self.datafile("Ni.stru")) - self.P.read_struct(self.datafile("PbScW25TiO3.stru")) - self.P.alloc("X", 0.0, 0.05, 0.1, 10, 200) - self.P.setphase(1) - self.P.setvar("stepcut", d1) - self.P.setphase(2) - self.P.setvar("stepcut", d2) - self.P.calc() - Gtot = numpy.array(self.P.getpdf_fit()) - dG = G1 + G2 - Gtot - r = numpy.array(self.P.getR()) - msd = numpy.dot(dG, dG) / len(r) - self.assertAlmostEqual(0.0, numpy.sqrt(msd), self.places) - # G after step should be zero - self.assertTrue(numpy.all(0 == Gtot[r > max(d1, d2)])) - return - - def test_stepcut_io(self): - """Check reading and writing of stepcut from structure file.""" - import re - - self.P.read_struct(self.datafile("Ni.stru")) - self.assertEqual(0.0, self.P.getvar("stepcut")) - # engine should not write shape factor when not defined - sscnone = self.P.save_struct_string(1) - self.assertTrue(not re.search("(?m)^shape +stepcut,", sscnone)) - self.P.setvar("stepcut", 7) - ssc7 = self.P.save_struct_string(1) - # ssc7 should contain shape factor data - self.assertTrue(re.search("(?m)^shape +stepcut,", ssc7)) - self.P.reset() - self.P.read_struct_string(ssc7) - self.assertEqual(7.0, self.P.getvar("stepcut")) - # try to read without comma - ssc14 = re.sub("(?m)^shape +stepcut.*$", "shape stepcut 14.00", ssc7) - self.P.read_struct_string(ssc14) - self.assertEqual(14.0, self.P.getvar("stepcut")) - # try to read invalid shape data - sinvalid = re.sub("(?m)^shape .*", "shape invalid, 1", ssc7) - self.assertRaises( - pdffit2.structureError, self.P.read_struct_string, sinvalid - ) - return - - -# End of class TestStepCutEnvelope - -if __name__ == "__main__": - unittest.main() - -# End of file diff --git a/tests/test_version.py b/tests/test_version.py deleted file mode 100644 index a232202f..00000000 --- a/tests/test_version.py +++ /dev/null @@ -1,10 +0,0 @@ -"""Unit tests for __version__.py.""" - -import diffpy.pdffit2 # noqa - - -def test_package_version(): - """Ensure the package version is defined and not set to the initial - placeholder.""" - assert hasattr(diffpy.pdffit2, "__version__") - assert diffpy.pdffit2.__version__ != "0.0.0" diff --git a/tests/testdata/300K.gr b/tests/testdata/300K.gr deleted file mode 100644 index 15578911..00000000 --- a/tests/testdata/300K.gr +++ /dev/null @@ -1,2062 +0,0 @@ -History written: Fri Apr 30 13:05:36 2004 -produced by -##### Run Information runCorrection=T -prep=gsas machine=npdf -run=300K background=npdf_00907 -smooth=2 smoothParam=32 32 0 backKillThresh=-1.0 -in beam: radius=0.635 height=2.54 -temp=308 runTitle=Run 1018: LMO - RT (before), HIPPO-furnace - -##### Vanadium runCorrection=T -run=npdf_00709 background=npdf_00710 -smooth=2 smoothParam=32 32 0 vanKillThresh=4.0 vBackKillThresh=-1.0 -in beam: radius=0.635 height=2.54 - -##### Container runCorrection=T -run=npdf_00917 background=npdf_00907 -smooth=2 smoothParam=32 32 0 cBackKillThresh=-1.0 -wallThick=0.023 atomDensity=0.072110 -atomic information: scattCS=5.100 absorpCS=5.080 - -##### Sample Material numElements=3 NormLaue=0.47445 -Element relAtomNum atomMass atomCoherCS atomIncoherCS atomAbsorpCS - O 0.6000 15.999 4.2320 0.0008 0.00019 - Mn 0.2000 54.931 -1.7500 0.4000 13.30000 - La 0.2000 138.905 8.5300 1.1300 8.97000 -density= effDensity=3.4138 - -##### Banks=6 deltaQ=0.01 matchRef=0 matchScal=T matchOffset=T -bank angle blendQmin blendQmax (0.0 means no info) - 1 90.0 1.62 29.42 - 2 -90.0 1.62 29.42 - 3 119.0 1.97 35.85 - 4 -119.0 1.97 35.85 - 5 148.0 2.20 40.00 - 6 -148.0 2.20 40.00 - -##### Program Specific Information -## Ft calcError=1 (1 for true, 0 for false) -numRpoints=2000 maxR=20.0 numDensity=0.0 intMaxR=1.5 -## Damp Qmin=2.0 Qmax=32 startDampQ=32 QAveMin=0.6 -dampFuncType=0 modEqn=1.0000*S(Q) +0.0000 +0.0000*Q dampExtraToZero=0 -## Blend numBanks=6 banks=1,2,3,4,5,6 -## Soqd minProcOut=0 -samPlazcek=0 vanPlazcek=0 smoothData=0 modifyData=1 -## Corps minProcOut=0 numBanksMiss=0 - -##### prepgsas prepOutput=1 numBanksMiss=0 fileExt=gsa -instParamFile=npdf_displex_757.iparm -numBanksAdd=0 -numBanksMult=6 -Bank# mulData mulBack - 1 1.0230 1.0000 - 2 1.0300 1.0000 - 3 1.0200 1.0000 - 4 0.9800 1.0000 - 5 0.9930 1.0000 - 6 0.9750 1.0000 -##### start data -#O0 rg_int sig_rg_int low_int sig_low_int rmax rhofit -#S 1 - PDF from PDFgetN -#P0 -4.09986 0.44295 0.11702 0.01370 1.50 0.0731 -#L r G(r) dr dG(r) - 0.010 0.086 0.0 0.0441 - 0.020 0.149 0.0 0.0849 - 0.030 0.169 0.0 0.1193 - 0.040 0.130 0.0 0.1448 - 0.050 0.021 0.0 0.1598 - 0.060 -0.160 0.0 0.1637 - 0.070 -0.410 0.0 0.1568 - 0.080 -0.717 0.0 0.1411 - 0.090 -1.064 0.0 0.1196 - 0.100 -1.428 0.0 0.0979 - 0.110 -1.782 0.0 0.0842 - 0.120 -2.101 0.0 0.0854 - 0.130 -2.359 0.0 0.0992 - 0.140 -2.535 0.0 0.1166 - 0.150 -2.612 0.0 0.1311 - 0.160 -2.581 0.0 0.1392 - 0.170 -2.440 0.0 0.1400 - 0.180 -2.196 0.0 0.1341 - 0.190 -1.863 0.0 0.1238 - 0.200 -1.462 0.0 0.1126 - 0.210 -1.017 0.0 0.1050 - 0.220 -0.556 0.0 0.1044 - 0.230 -0.109 0.0 0.1107 - 0.240 0.299 0.0 0.1202 - 0.250 0.643 0.0 0.1290 - 0.260 0.906 0.0 0.1341 - 0.270 1.077 0.0 0.1343 - 0.280 1.152 0.0 0.1298 - 0.290 1.134 0.0 0.1222 - 0.300 1.035 0.0 0.1143 - 0.310 0.870 0.0 0.1091 - 0.320 0.660 0.0 0.1090 - 0.330 0.426 0.0 0.1137 - 0.340 0.193 0.0 0.1209 - 0.350 -0.019 0.0 0.1275 - 0.360 -0.192 0.0 0.1313 - 0.370 -0.313 0.0 0.1313 - 0.380 -0.373 0.0 0.1276 - 0.390 -0.372 0.0 0.1217 - 0.400 -0.314 0.0 0.1156 - 0.410 -0.207 0.0 0.1119 - 0.420 -0.065 0.0 0.1121 - 0.430 0.095 0.0 0.1159 - 0.440 0.257 0.0 0.1215 - 0.450 0.404 0.0 0.1267 - 0.460 0.523 0.0 0.1295 - 0.470 0.601 0.0 0.1292 - 0.480 0.632 0.0 0.1259 - 0.490 0.614 0.0 0.1210 - 0.500 0.548 0.0 0.1163 - 0.510 0.443 0.0 0.1136 - 0.520 0.307 0.0 0.1141 - 0.530 0.152 0.0 0.1175 - 0.540 -0.007 0.0 0.1222 - 0.550 -0.158 0.0 0.1263 - 0.560 -0.290 0.0 0.1283 - 0.570 -0.393 0.0 0.1277 - 0.580 -0.461 0.0 0.1248 - 0.590 -0.493 0.0 0.1205 - 0.600 -0.490 0.0 0.1166 - 0.610 -0.458 0.0 0.1146 - 0.620 -0.404 0.0 0.1153 - 0.630 -0.338 0.0 0.1184 - 0.640 -0.271 0.0 0.1225 - 0.650 -0.214 0.0 0.1259 - 0.660 -0.176 0.0 0.1275 - 0.670 -0.163 0.0 0.1268 - 0.680 -0.180 0.0 0.1240 - 0.690 -0.228 0.0 0.1203 - 0.700 -0.306 0.0 0.1171 - 0.710 -0.409 0.0 0.1156 - 0.720 -0.529 0.0 0.1164 - 0.730 -0.659 0.0 0.1192 - 0.740 -0.789 0.0 0.1226 - 0.750 -0.910 0.0 0.1254 - 0.760 -1.015 0.0 0.1265 - 0.770 -1.097 0.0 0.1257 - 0.780 -1.153 0.0 0.1232 - 0.790 -1.181 0.0 0.1200 - 0.800 -1.185 0.0 0.1173 - 0.810 -1.166 0.0 0.1163 - 0.820 -1.132 0.0 0.1173 - 0.830 -1.088 0.0 0.1198 - 0.840 -1.043 0.0 0.1228 - 0.850 -1.002 0.0 0.1251 - 0.860 -0.973 0.0 0.1259 - 0.870 -0.958 0.0 0.1249 - 0.880 -0.961 0.0 0.1226 - 0.890 -0.982 0.0 0.1198 - 0.900 -1.018 0.0 0.1177 - 0.910 -1.066 0.0 0.1170 - 0.920 -1.122 0.0 0.1181 - 0.930 -1.179 0.0 0.1204 - 0.940 -1.232 0.0 0.1229 - 0.950 -1.277 0.0 0.1247 - 0.960 -1.308 0.0 0.1251 - 0.970 -1.324 0.0 0.1240 - 0.980 -1.325 0.0 0.1219 - 0.990 -1.311 0.0 0.1195 - 1.000 -1.287 0.0 0.1178 - 1.010 -1.255 0.0 0.1175 - 1.020 -1.222 0.0 0.1187 - 1.030 -1.192 0.0 0.1208 - 1.040 -1.170 0.0 0.1231 - 1.050 -1.161 0.0 0.1245 - 1.060 -1.165 0.0 0.1246 - 1.070 -1.185 0.0 0.1234 - 1.080 -1.217 0.0 0.1214 - 1.090 -1.260 0.0 0.1193 - 1.100 -1.309 0.0 0.1180 - 1.110 -1.358 0.0 0.1180 - 1.120 -1.401 0.0 0.1193 - 1.130 -1.432 0.0 0.1212 - 1.140 -1.448 0.0 0.1231 - 1.150 -1.443 0.0 0.1242 - 1.160 -1.417 0.0 0.1241 - 1.170 -1.371 0.0 0.1228 - 1.180 -1.307 0.0 0.1209 - 1.190 -1.230 0.0 0.1191 - 1.200 -1.147 0.0 0.1182 - 1.210 -1.065 0.0 0.1184 - 1.220 -0.992 0.0 0.1198 - 1.230 -0.934 0.0 0.1217 - 1.240 -0.898 0.0 0.1233 - 1.250 -0.888 0.0 0.1241 - 1.260 -0.905 0.0 0.1237 - 1.270 -0.950 0.0 0.1224 - 1.280 -1.019 0.0 0.1206 - 1.290 -1.106 0.0 0.1191 - 1.300 -1.205 0.0 0.1184 - 1.310 -1.306 0.0 0.1188 - 1.320 -1.400 0.0 0.1202 - 1.330 -1.479 0.0 0.1220 - 1.340 -1.534 0.0 0.1234 - 1.350 -1.562 0.0 0.1239 - 1.360 -1.557 0.0 0.1234 - 1.370 -1.519 0.0 0.1220 - 1.380 -1.452 0.0 0.1204 - 1.390 -1.360 0.0 0.1190 - 1.400 -1.251 0.0 0.1186 - 1.410 -1.133 0.0 0.1193 - 1.420 -1.017 0.0 0.1207 - 1.430 -0.913 0.0 0.1224 - 1.440 -0.830 0.0 0.1236 - 1.450 -0.775 0.0 0.1239 - 1.460 -0.755 0.0 0.1232 - 1.470 -0.770 0.0 0.1217 - 1.480 -0.822 0.0 0.1201 - 1.490 -0.906 0.0 0.1190 - 1.500 -1.017 0.0 0.1188 - 1.510 -1.147 0.0 0.1196 - 1.520 -1.285 0.0 0.1210 - 1.530 -1.422 0.0 0.1226 - 1.540 -1.548 0.0 0.1236 - 1.550 -1.653 0.0 0.1238 - 1.560 -1.730 0.0 0.1230 - 1.570 -1.774 0.0 0.1216 - 1.580 -1.781 0.0 0.1201 - 1.590 -1.753 0.0 0.1191 - 1.600 -1.691 0.0 0.1190 - 1.610 -1.600 0.0 0.1198 - 1.620 -1.487 0.0 0.1213 - 1.630 -1.360 0.0 0.1227 - 1.640 -1.227 0.0 0.1236 - 1.650 -1.097 0.0 0.1236 - 1.660 -0.977 0.0 0.1227 - 1.670 -0.876 0.0 0.1213 - 1.680 -0.797 0.0 0.1200 - 1.690 -0.747 0.0 0.1191 - 1.700 -0.727 0.0 0.1191 - 1.710 -0.739 0.0 0.1200 - 1.720 -0.782 0.0 0.1214 - 1.730 -0.858 0.0 0.1227 - 1.740 -0.964 0.0 0.1234 - 1.750 -1.099 0.0 0.1234 - 1.760 -1.262 0.0 0.1225 - 1.770 -1.452 0.0 0.1212 - 1.780 -1.668 0.0 0.1200 - 1.790 -1.908 0.0 0.1193 - 1.800 -2.171 0.0 0.1195 - 1.810 -2.456 0.0 0.1204 - 1.820 -2.758 0.0 0.1216 - 1.830 -3.075 0.0 0.1227 - 1.840 -3.401 0.0 0.1233 - 1.850 -3.730 0.0 0.1230 - 1.860 -4.053 0.0 0.1221 - 1.870 -4.362 0.0 0.1209 - 1.880 -4.647 0.0 0.1198 - 1.890 -4.897 0.0 0.1194 - 1.900 -5.103 0.0 0.1197 - 1.910 -5.256 0.0 0.1206 - 1.920 -5.349 0.0 0.1218 - 1.930 -5.378 0.0 0.1227 - 1.940 -5.342 0.0 0.1231 - 1.950 -5.241 0.0 0.1227 - 1.960 -5.081 0.0 0.1218 - 1.970 -4.869 0.0 0.1207 - 1.980 -4.618 0.0 0.1198 - 1.990 -4.340 0.0 0.1196 - 2.000 -4.050 0.0 0.1200 - 2.010 -3.762 0.0 0.1210 - 2.020 -3.493 0.0 0.1221 - 2.030 -3.253 0.0 0.1229 - 2.040 -3.056 0.0 0.1231 - 2.050 -2.907 0.0 0.1226 - 2.060 -2.811 0.0 0.1215 - 2.070 -2.769 0.0 0.1204 - 2.080 -2.778 0.0 0.1197 - 2.090 -2.831 0.0 0.1196 - 2.100 -2.918 0.0 0.1201 - 2.110 -3.029 0.0 0.1211 - 2.120 -3.150 0.0 0.1222 - 2.130 -3.270 0.0 0.1229 - 2.140 -3.377 0.0 0.1229 - 2.150 -3.460 0.0 0.1223 - 2.160 -3.511 0.0 0.1213 - 2.170 -3.525 0.0 0.1202 - 2.180 -3.499 0.0 0.1196 - 2.190 -3.432 0.0 0.1196 - 2.200 -3.327 0.0 0.1202 - 2.210 -3.188 0.0 0.1213 - 2.220 -3.019 0.0 0.1223 - 2.230 -2.825 0.0 0.1229 - 2.240 -2.613 0.0 0.1229 - 2.250 -2.385 0.0 0.1222 - 2.260 -2.145 0.0 0.1212 - 2.270 -1.895 0.0 0.1202 - 2.280 -1.633 0.0 0.1197 - 2.290 -1.359 0.0 0.1197 - 2.300 -1.069 0.0 0.1204 - 2.310 -0.761 0.0 0.1214 - 2.320 -0.431 0.0 0.1223 - 2.330 -0.077 0.0 0.1228 - 2.340 0.303 0.0 0.1227 - 2.350 0.706 0.0 0.1221 - 2.360 1.131 0.0 0.1211 - 2.370 1.571 0.0 0.1203 - 2.380 2.020 0.0 0.1198 - 2.390 2.466 0.0 0.1199 - 2.400 2.899 0.0 0.1206 - 2.410 3.309 0.0 0.1215 - 2.420 3.682 0.0 0.1223 - 2.430 4.010 0.0 0.1227 - 2.440 4.285 0.0 0.1225 - 2.450 4.501 0.0 0.1218 - 2.460 4.656 0.0 0.1210 - 2.470 4.751 0.0 0.1203 - 2.480 4.792 0.0 0.1200 - 2.490 4.788 0.0 0.1203 - 2.500 4.749 0.0 0.1210 - 2.510 4.688 0.0 0.1218 - 2.520 4.620 0.0 0.1225 - 2.530 4.558 0.0 0.1226 - 2.540 4.518 0.0 0.1223 - 2.550 4.508 0.0 0.1215 - 2.560 4.539 0.0 0.1207 - 2.570 4.615 0.0 0.1201 - 2.580 4.738 0.0 0.1200 - 2.590 4.907 0.0 0.1204 - 2.600 5.115 0.0 0.1212 - 2.610 5.354 0.0 0.1220 - 2.620 5.613 0.0 0.1226 - 2.630 5.882 0.0 0.1226 - 2.640 6.146 0.0 0.1222 - 2.650 6.395 0.0 0.1213 - 2.660 6.619 0.0 0.1205 - 2.670 6.808 0.0 0.1200 - 2.680 6.957 0.0 0.1200 - 2.690 7.063 0.0 0.1205 - 2.700 7.126 0.0 0.1214 - 2.710 7.148 0.0 0.1222 - 2.720 7.134 0.0 0.1227 - 2.730 7.090 0.0 0.1226 - 2.740 7.023 0.0 0.1221 - 2.750 6.941 0.0 0.1212 - 2.760 6.849 0.0 0.1204 - 2.770 6.754 0.0 0.1200 - 2.780 6.659 0.0 0.1201 - 2.790 6.567 0.0 0.1206 - 2.800 6.477 0.0 0.1215 - 2.810 6.388 0.0 0.1222 - 2.820 6.297 0.0 0.1226 - 2.830 6.201 0.0 0.1225 - 2.840 6.094 0.0 0.1219 - 2.850 5.972 0.0 0.1211 - 2.860 5.832 0.0 0.1204 - 2.870 5.671 0.0 0.1200 - 2.880 5.487 0.0 0.1202 - 2.890 5.281 0.0 0.1209 - 2.900 5.053 0.0 0.1217 - 2.910 4.807 0.0 0.1224 - 2.920 4.548 0.0 0.1227 - 2.930 4.279 0.0 0.1225 - 2.940 4.006 0.0 0.1218 - 2.950 3.734 0.0 0.1210 - 2.960 3.467 0.0 0.1203 - 2.970 3.208 0.0 0.1200 - 2.980 2.958 0.0 0.1202 - 2.990 2.720 0.0 0.1209 - 3.000 2.491 0.0 0.1218 - 3.010 2.269 0.0 0.1224 - 3.020 2.053 0.0 0.1227 - 3.030 1.838 0.0 0.1224 - 3.040 1.622 0.0 0.1217 - 3.050 1.402 0.0 0.1209 - 3.060 1.176 0.0 0.1202 - 3.070 0.942 0.0 0.1200 - 3.080 0.703 0.0 0.1203 - 3.090 0.459 0.0 0.1210 - 3.100 0.213 0.0 0.1218 - 3.110 -0.029 0.0 0.1224 - 3.120 -0.263 0.0 0.1226 - 3.130 -0.484 0.0 0.1223 - 3.140 -0.688 0.0 0.1216 - 3.150 -0.868 0.0 0.1208 - 3.160 -1.024 0.0 0.1202 - 3.170 -1.152 0.0 0.1201 - 3.180 -1.254 0.0 0.1204 - 3.190 -1.330 0.0 0.1211 - 3.200 -1.385 0.0 0.1218 - 3.210 -1.423 0.0 0.1223 - 3.220 -1.450 0.0 0.1224 - 3.230 -1.472 0.0 0.1220 - 3.240 -1.495 0.0 0.1214 - 3.250 -1.526 0.0 0.1206 - 3.260 -1.568 0.0 0.1202 - 3.270 -1.625 0.0 0.1201 - 3.280 -1.698 0.0 0.1205 - 3.290 -1.787 0.0 0.1212 - 3.300 -1.888 0.0 0.1220 - 3.310 -1.998 0.0 0.1224 - 3.320 -2.111 0.0 0.1224 - 3.330 -2.220 0.0 0.1219 - 3.340 -2.319 0.0 0.1212 - 3.350 -2.401 0.0 0.1205 - 3.360 -2.460 0.0 0.1201 - 3.370 -2.492 0.0 0.1201 - 3.380 -2.495 0.0 0.1206 - 3.390 -2.467 0.0 0.1213 - 3.400 -2.411 0.0 0.1220 - 3.410 -2.329 0.0 0.1224 - 3.420 -2.229 0.0 0.1223 - 3.430 -2.116 0.0 0.1219 - 3.440 -1.998 0.0 0.1212 - 3.450 -1.885 0.0 0.1205 - 3.460 -1.785 0.0 0.1202 - 3.470 -1.705 0.0 0.1202 - 3.480 -1.652 0.0 0.1207 - 3.490 -1.631 0.0 0.1214 - 3.500 -1.645 0.0 0.1220 - 3.510 -1.696 0.0 0.1223 - 3.520 -1.782 0.0 0.1222 - 3.530 -1.901 0.0 0.1217 - 3.540 -2.049 0.0 0.1211 - 3.550 -2.219 0.0 0.1205 - 3.560 -2.405 0.0 0.1203 - 3.570 -2.600 0.0 0.1204 - 3.580 -2.797 0.0 0.1209 - 3.590 -2.990 0.0 0.1215 - 3.600 -3.171 0.0 0.1220 - 3.610 -3.337 0.0 0.1223 - 3.620 -3.483 0.0 0.1221 - 3.630 -3.605 0.0 0.1216 - 3.640 -3.702 0.0 0.1210 - 3.650 -3.771 0.0 0.1205 - 3.660 -3.813 0.0 0.1204 - 3.670 -3.826 0.0 0.1206 - 3.680 -3.810 0.0 0.1211 - 3.690 -3.765 0.0 0.1217 - 3.700 -3.691 0.0 0.1221 - 3.710 -3.589 0.0 0.1222 - 3.720 -3.456 0.0 0.1219 - 3.730 -3.294 0.0 0.1214 - 3.740 -3.101 0.0 0.1209 - 3.750 -2.880 0.0 0.1205 - 3.760 -2.629 0.0 0.1205 - 3.770 -2.351 0.0 0.1208 - 3.780 -2.049 0.0 0.1213 - 3.790 -1.726 0.0 0.1219 - 3.800 -1.387 0.0 0.1222 - 3.810 -1.038 0.0 0.1222 - 3.820 -0.686 0.0 0.1219 - 3.830 -0.338 0.0 0.1213 - 3.840 -0.003 0.0 0.1208 - 3.850 0.312 0.0 0.1205 - 3.860 0.598 0.0 0.1205 - 3.870 0.848 0.0 0.1209 - 3.880 1.056 0.0 0.1215 - 3.890 1.215 0.0 0.1220 - 3.900 1.323 0.0 0.1223 - 3.910 1.377 0.0 0.1222 - 3.920 1.376 0.0 0.1218 - 3.930 1.322 0.0 0.1212 - 3.940 1.217 0.0 0.1206 - 3.950 1.065 0.0 0.1204 - 3.960 0.871 0.0 0.1205 - 3.970 0.640 0.0 0.1210 - 3.980 0.378 0.0 0.1216 - 3.990 0.091 0.0 0.1221 - 4.000 -0.215 0.0 0.1223 - 4.010 -0.536 0.0 0.1222 - 4.020 -0.866 0.0 0.1217 - 4.030 -1.203 0.0 0.1211 - 4.040 -1.543 0.0 0.1206 - 4.050 -1.884 0.0 0.1204 - 4.060 -2.224 0.0 0.1206 - 4.070 -2.562 0.0 0.1211 - 4.080 -2.896 0.0 0.1217 - 4.090 -3.225 0.0 0.1222 - 4.100 -3.547 0.0 0.1223 - 4.110 -3.859 0.0 0.1221 - 4.120 -4.159 0.0 0.1216 - 4.130 -4.443 0.0 0.1210 - 4.140 -4.707 0.0 0.1205 - 4.150 -4.946 0.0 0.1203 - 4.160 -5.155 0.0 0.1205 - 4.170 -5.329 0.0 0.1211 - 4.180 -5.463 0.0 0.1217 - 4.190 -5.552 0.0 0.1222 - 4.200 -5.595 0.0 0.1224 - 4.210 -5.588 0.0 0.1221 - 4.220 -5.529 0.0 0.1216 - 4.230 -5.421 0.0 0.1210 - 4.240 -5.265 0.0 0.1205 - 4.250 -5.064 0.0 0.1204 - 4.260 -4.824 0.0 0.1206 - 4.270 -4.551 0.0 0.1211 - 4.280 -4.251 0.0 0.1217 - 4.290 -3.932 0.0 0.1221 - 4.300 -3.602 0.0 0.1222 - 4.310 -3.268 0.0 0.1219 - 4.320 -2.936 0.0 0.1214 - 4.330 -2.613 0.0 0.1209 - 4.340 -2.302 0.0 0.1205 - 4.350 -2.007 0.0 0.1204 - 4.360 -1.729 0.0 0.1207 - 4.370 -1.469 0.0 0.1212 - 4.380 -1.226 0.0 0.1218 - 4.390 -0.996 0.0 0.1221 - 4.400 -0.779 0.0 0.1222 - 4.410 -0.569 0.0 0.1219 - 4.420 -0.365 0.0 0.1213 - 4.430 -0.162 0.0 0.1208 - 4.440 0.042 0.0 0.1205 - 4.450 0.248 0.0 0.1205 - 4.460 0.456 0.0 0.1208 - 4.470 0.667 0.0 0.1213 - 4.480 0.878 0.0 0.1218 - 4.490 1.086 0.0 0.1221 - 4.500 1.288 0.0 0.1220 - 4.510 1.481 0.0 0.1217 - 4.520 1.658 0.0 0.1212 - 4.530 1.818 0.0 0.1207 - 4.540 1.955 0.0 0.1204 - 4.550 2.067 0.0 0.1205 - 4.560 2.153 0.0 0.1208 - 4.570 2.213 0.0 0.1214 - 4.580 2.249 0.0 0.1218 - 4.590 2.262 0.0 0.1221 - 4.600 2.258 0.0 0.1220 - 4.610 2.241 0.0 0.1216 - 4.620 2.219 0.0 0.1211 - 4.630 2.198 0.0 0.1207 - 4.640 2.185 0.0 0.1204 - 4.650 2.185 0.0 0.1206 - 4.660 2.205 0.0 0.1209 - 4.670 2.249 0.0 0.1214 - 4.680 2.319 0.0 0.1219 - 4.690 2.416 0.0 0.1220 - 4.700 2.540 0.0 0.1219 - 4.710 2.688 0.0 0.1215 - 4.720 2.856 0.0 0.1210 - 4.730 3.037 0.0 0.1206 - 4.740 3.226 0.0 0.1204 - 4.750 3.413 0.0 0.1206 - 4.760 3.592 0.0 0.1210 - 4.770 3.755 0.0 0.1215 - 4.780 3.896 0.0 0.1219 - 4.790 4.007 0.0 0.1220 - 4.800 4.084 0.0 0.1219 - 4.810 4.125 0.0 0.1215 - 4.820 4.129 0.0 0.1210 - 4.830 4.094 0.0 0.1207 - 4.840 4.025 0.0 0.1206 - 4.850 3.923 0.0 0.1208 - 4.860 3.794 0.0 0.1212 - 4.870 3.642 0.0 0.1216 - 4.880 3.474 0.0 0.1219 - 4.890 3.295 0.0 0.1220 - 4.900 3.112 0.0 0.1218 - 4.910 2.928 0.0 0.1214 - 4.920 2.748 0.0 0.1210 - 4.930 2.576 0.0 0.1207 - 4.940 2.412 0.0 0.1207 - 4.950 2.258 0.0 0.1210 - 4.960 2.113 0.0 0.1214 - 4.970 1.977 0.0 0.1218 - 4.980 1.847 0.0 0.1220 - 4.990 1.720 0.0 0.1220 - 5.000 1.594 0.0 0.1217 - 5.010 1.467 0.0 0.1213 - 5.020 1.336 0.0 0.1209 - 5.030 1.199 0.0 0.1207 - 5.040 1.057 0.0 0.1208 - 5.050 0.908 0.0 0.1211 - 5.060 0.754 0.0 0.1215 - 5.070 0.597 0.0 0.1219 - 5.080 0.440 0.0 0.1220 - 5.090 0.286 0.0 0.1219 - 5.100 0.140 0.0 0.1216 - 5.110 0.005 0.0 0.1211 - 5.120 -0.113 0.0 0.1208 - 5.130 -0.212 0.0 0.1206 - 5.140 -0.288 0.0 0.1207 - 5.150 -0.338 0.0 0.1211 - 5.160 -0.360 0.0 0.1216 - 5.170 -0.356 0.0 0.1220 - 5.180 -0.325 0.0 0.1221 - 5.190 -0.270 0.0 0.1220 - 5.200 -0.195 0.0 0.1216 - 5.210 -0.104 0.0 0.1211 - 5.220 -0.003 0.0 0.1208 - 5.230 0.102 0.0 0.1207 - 5.240 0.205 0.0 0.1208 - 5.250 0.299 0.0 0.1212 - 5.260 0.378 0.0 0.1217 - 5.270 0.439 0.0 0.1220 - 5.280 0.476 0.0 0.1221 - 5.290 0.487 0.0 0.1219 - 5.300 0.472 0.0 0.1215 - 5.310 0.432 0.0 0.1210 - 5.320 0.368 0.0 0.1207 - 5.330 0.285 0.0 0.1206 - 5.340 0.188 0.0 0.1208 - 5.350 0.084 0.0 0.1212 - 5.360 -0.020 0.0 0.1217 - 5.370 -0.116 0.0 0.1220 - 5.380 -0.197 0.0 0.1220 - 5.390 -0.256 0.0 0.1218 - 5.400 -0.287 0.0 0.1214 - 5.410 -0.287 0.0 0.1209 - 5.420 -0.250 0.0 0.1206 - 5.430 -0.178 0.0 0.1206 - 5.440 -0.070 0.0 0.1208 - 5.450 0.070 0.0 0.1212 - 5.460 0.240 0.0 0.1217 - 5.470 0.433 0.0 0.1219 - 5.480 0.643 0.0 0.1219 - 5.490 0.863 0.0 0.1217 - 5.500 1.086 0.0 0.1212 - 5.510 1.306 0.0 0.1208 - 5.520 1.515 0.0 0.1206 - 5.530 1.711 0.0 0.1206 - 5.540 1.889 0.0 0.1209 - 5.550 2.048 0.0 0.1214 - 5.560 2.187 0.0 0.1218 - 5.570 2.307 0.0 0.1221 - 5.580 2.412 0.0 0.1220 - 5.590 2.504 0.0 0.1217 - 5.600 2.587 0.0 0.1213 - 5.610 2.664 0.0 0.1209 - 5.620 2.740 0.0 0.1206 - 5.630 2.817 0.0 0.1207 - 5.640 2.897 0.0 0.1210 - 5.650 2.979 0.0 0.1214 - 5.660 3.062 0.0 0.1218 - 5.670 3.144 0.0 0.1220 - 5.680 3.221 0.0 0.1219 - 5.690 3.287 0.0 0.1216 - 5.700 3.338 0.0 0.1212 - 5.710 3.366 0.0 0.1208 - 5.720 3.366 0.0 0.1206 - 5.730 3.333 0.0 0.1207 - 5.740 3.264 0.0 0.1210 - 5.750 3.156 0.0 0.1214 - 5.760 3.009 0.0 0.1218 - 5.770 2.825 0.0 0.1219 - 5.780 2.606 0.0 0.1218 - 5.790 2.357 0.0 0.1215 - 5.800 2.087 0.0 0.1211 - 5.810 1.802 0.0 0.1207 - 5.820 1.511 0.0 0.1206 - 5.830 1.222 0.0 0.1207 - 5.840 0.944 0.0 0.1210 - 5.850 0.684 0.0 0.1214 - 5.860 0.447 0.0 0.1218 - 5.870 0.238 0.0 0.1219 - 5.880 0.059 0.0 0.1217 - 5.890 -0.089 0.0 0.1214 - 5.900 -0.208 0.0 0.1210 - 5.910 -0.301 0.0 0.1207 - 5.920 -0.374 0.0 0.1206 - 5.930 -0.430 0.0 0.1208 - 5.940 -0.477 0.0 0.1212 - 5.950 -0.520 0.0 0.1216 - 5.960 -0.566 0.0 0.1219 - 5.970 -0.619 0.0 0.1219 - 5.980 -0.684 0.0 0.1217 - 5.990 -0.763 0.0 0.1214 - 6.000 -0.859 0.0 0.1210 - 6.010 -0.971 0.0 0.1207 - 6.020 -1.098 0.0 0.1207 - 6.030 -1.238 0.0 0.1209 - 6.040 -1.388 0.0 0.1212 - 6.050 -1.545 0.0 0.1216 - 6.060 -1.705 0.0 0.1219 - 6.070 -1.865 0.0 0.1220 - 6.080 -2.021 0.0 0.1217 - 6.090 -2.172 0.0 0.1214 - 6.100 -2.315 0.0 0.1210 - 6.110 -2.449 0.0 0.1207 - 6.120 -2.575 0.0 0.1207 - 6.130 -2.694 0.0 0.1209 - 6.140 -2.805 0.0 0.1213 - 6.150 -2.912 0.0 0.1217 - 6.160 -3.016 0.0 0.1219 - 6.170 -3.119 0.0 0.1219 - 6.180 -3.223 0.0 0.1217 - 6.190 -3.329 0.0 0.1213 - 6.200 -3.439 0.0 0.1210 - 6.210 -3.552 0.0 0.1208 - 6.220 -3.669 0.0 0.1208 - 6.230 -3.789 0.0 0.1211 - 6.240 -3.911 0.0 0.1214 - 6.250 -4.033 0.0 0.1217 - 6.260 -4.153 0.0 0.1219 - 6.270 -4.269 0.0 0.1218 - 6.280 -4.378 0.0 0.1216 - 6.290 -4.478 0.0 0.1213 - 6.300 -4.567 0.0 0.1210 - 6.310 -4.640 0.0 0.1208 - 6.320 -4.697 0.0 0.1209 - 6.330 -4.734 0.0 0.1212 - 6.340 -4.751 0.0 0.1215 - 6.350 -4.745 0.0 0.1218 - 6.360 -4.714 0.0 0.1219 - 6.370 -4.659 0.0 0.1218 - 6.380 -4.578 0.0 0.1215 - 6.390 -4.473 0.0 0.1211 - 6.400 -4.344 0.0 0.1209 - 6.410 -4.194 0.0 0.1208 - 6.420 -4.025 0.0 0.1209 - 6.430 -3.840 0.0 0.1212 - 6.440 -3.645 0.0 0.1215 - 6.450 -3.443 0.0 0.1218 - 6.460 -3.241 0.0 0.1219 - 6.470 -3.045 0.0 0.1217 - 6.480 -2.860 0.0 0.1214 - 6.490 -2.691 0.0 0.1211 - 6.500 -2.545 0.0 0.1208 - 6.510 -2.424 0.0 0.1208 - 6.520 -2.333 0.0 0.1210 - 6.530 -2.272 0.0 0.1213 - 6.540 -2.241 0.0 0.1217 - 6.550 -2.239 0.0 0.1219 - 6.560 -2.262 0.0 0.1219 - 6.570 -2.305 0.0 0.1216 - 6.580 -2.361 0.0 0.1213 - 6.590 -2.425 0.0 0.1209 - 6.600 -2.488 0.0 0.1207 - 6.610 -2.541 0.0 0.1207 - 6.620 -2.578 0.0 0.1209 - 6.630 -2.592 0.0 0.1213 - 6.640 -2.577 0.0 0.1216 - 6.650 -2.530 0.0 0.1219 - 6.660 -2.449 0.0 0.1218 - 6.670 -2.334 0.0 0.1216 - 6.680 -2.187 0.0 0.1213 - 6.690 -2.012 0.0 0.1209 - 6.700 -1.815 0.0 0.1207 - 6.710 -1.601 0.0 0.1207 - 6.720 -1.380 0.0 0.1209 - 6.730 -1.158 0.0 0.1213 - 6.740 -0.944 0.0 0.1216 - 6.750 -0.743 0.0 0.1218 - 6.760 -0.562 0.0 0.1218 - 6.770 -0.404 0.0 0.1216 - 6.780 -0.272 0.0 0.1212 - 6.790 -0.166 0.0 0.1209 - 6.800 -0.083 0.0 0.1208 - 6.810 -0.022 0.0 0.1208 - 6.820 0.023 0.0 0.1211 - 6.830 0.057 0.0 0.1214 - 6.840 0.088 0.0 0.1217 - 6.850 0.122 0.0 0.1218 - 6.860 0.164 0.0 0.1217 - 6.870 0.222 0.0 0.1214 - 6.880 0.299 0.0 0.1211 - 6.890 0.398 0.0 0.1208 - 6.900 0.521 0.0 0.1207 - 6.910 0.667 0.0 0.1208 - 6.920 0.835 0.0 0.1211 - 6.930 1.021 0.0 0.1215 - 6.940 1.221 0.0 0.1217 - 6.950 1.428 0.0 0.1218 - 6.960 1.636 0.0 0.1217 - 6.970 1.839 0.0 0.1214 - 6.980 2.030 0.0 0.1211 - 6.990 2.203 0.0 0.1209 - 7.000 2.353 0.0 0.1208 - 7.010 2.476 0.0 0.1209 - 7.020 2.569 0.0 0.1212 - 7.030 2.630 0.0 0.1215 - 7.040 2.660 0.0 0.1217 - 7.050 2.658 0.0 0.1217 - 7.060 2.627 0.0 0.1216 - 7.070 2.571 0.0 0.1213 - 7.080 2.493 0.0 0.1210 - 7.090 2.397 0.0 0.1207 - 7.100 2.289 0.0 0.1207 - 7.110 2.173 0.0 0.1209 - 7.120 2.053 0.0 0.1213 - 7.130 1.933 0.0 0.1216 - 7.140 1.819 0.0 0.1218 - 7.150 1.712 0.0 0.1218 - 7.160 1.615 0.0 0.1216 - 7.170 1.531 0.0 0.1213 - 7.180 1.461 0.0 0.1210 - 7.190 1.405 0.0 0.1209 - 7.200 1.366 0.0 0.1209 - 7.210 1.342 0.0 0.1211 - 7.220 1.333 0.0 0.1214 - 7.230 1.340 0.0 0.1217 - 7.240 1.363 0.0 0.1218 - 7.250 1.401 0.0 0.1218 - 7.260 1.455 0.0 0.1216 - 7.270 1.524 0.0 0.1213 - 7.280 1.608 0.0 0.1210 - 7.290 1.707 0.0 0.1208 - 7.300 1.823 0.0 0.1209 - 7.310 1.954 0.0 0.1211 - 7.320 2.099 0.0 0.1215 - 7.330 2.260 0.0 0.1217 - 7.340 2.434 0.0 0.1219 - 7.350 2.620 0.0 0.1218 - 7.360 2.816 0.0 0.1216 - 7.370 3.018 0.0 0.1213 - 7.380 3.224 0.0 0.1210 - 7.390 3.430 0.0 0.1209 - 7.400 3.631 0.0 0.1210 - 7.410 3.823 0.0 0.1213 - 7.420 4.001 0.0 0.1216 - 7.430 4.160 0.0 0.1218 - 7.440 4.297 0.0 0.1219 - 7.450 4.406 0.0 0.1218 - 7.460 4.486 0.0 0.1215 - 7.470 4.534 0.0 0.1212 - 7.480 4.550 0.0 0.1209 - 7.490 4.533 0.0 0.1208 - 7.500 4.485 0.0 0.1210 - 7.510 4.408 0.0 0.1212 - 7.520 4.306 0.0 0.1216 - 7.530 4.183 0.0 0.1218 - 7.540 4.044 0.0 0.1218 - 7.550 3.892 0.0 0.1217 - 7.560 3.733 0.0 0.1214 - 7.570 3.571 0.0 0.1211 - 7.580 3.409 0.0 0.1209 - 7.590 3.251 0.0 0.1208 - 7.600 3.097 0.0 0.1210 - 7.610 2.949 0.0 0.1213 - 7.620 2.804 0.0 0.1216 - 7.630 2.663 0.0 0.1218 - 7.640 2.523 0.0 0.1218 - 7.650 2.380 0.0 0.1216 - 7.660 2.233 0.0 0.1213 - 7.670 2.077 0.0 0.1210 - 7.680 1.911 0.0 0.1208 - 7.690 1.734 0.0 0.1208 - 7.700 1.543 0.0 0.1210 - 7.710 1.341 0.0 0.1213 - 7.720 1.128 0.0 0.1216 - 7.730 0.906 0.0 0.1218 - 7.740 0.681 0.0 0.1218 - 7.750 0.455 0.0 0.1216 - 7.760 0.234 0.0 0.1213 - 7.770 0.022 0.0 0.1209 - 7.780 -0.176 0.0 0.1208 - 7.790 -0.356 0.0 0.1208 - 7.800 -0.514 0.0 0.1210 - 7.810 -0.650 0.0 0.1213 - 7.820 -0.761 0.0 0.1216 - 7.830 -0.848 0.0 0.1218 - 7.840 -0.912 0.0 0.1217 - 7.850 -0.957 0.0 0.1215 - 7.860 -0.984 0.0 0.1212 - 7.870 -0.997 0.0 0.1209 - 7.880 -1.000 0.0 0.1208 - 7.890 -0.996 0.0 0.1208 - 7.900 -0.988 0.0 0.1210 - 7.910 -0.978 0.0 0.1213 - 7.920 -0.968 0.0 0.1216 - 7.930 -0.958 0.0 0.1217 - 7.940 -0.949 0.0 0.1217 - 7.950 -0.939 0.0 0.1214 - 7.960 -0.928 0.0 0.1211 - 7.970 -0.914 0.0 0.1209 - 7.980 -0.897 0.0 0.1207 - 7.990 -0.876 0.0 0.1208 - 8.000 -0.850 0.0 0.1211 - 8.010 -0.821 0.0 0.1214 - 8.020 -0.791 0.0 0.1217 - 8.030 -0.761 0.0 0.1218 - 8.040 -0.736 0.0 0.1217 - 8.050 -0.718 0.0 0.1215 - 8.060 -0.711 0.0 0.1211 - 8.070 -0.718 0.0 0.1209 - 8.080 -0.742 0.0 0.1208 - 8.090 -0.784 0.0 0.1209 - 8.100 -0.845 0.0 0.1211 - 8.110 -0.922 0.0 0.1214 - 8.120 -1.014 0.0 0.1217 - 8.130 -1.115 0.0 0.1218 - 8.140 -1.220 0.0 0.1216 - 8.150 -1.322 0.0 0.1214 - 8.160 -1.415 0.0 0.1211 - 8.170 -1.489 0.0 0.1208 - 8.180 -1.540 0.0 0.1208 - 8.190 -1.561 0.0 0.1209 - 8.200 -1.549 0.0 0.1212 - 8.210 -1.501 0.0 0.1215 - 8.220 -1.417 0.0 0.1217 - 8.230 -1.300 0.0 0.1218 - 8.240 -1.155 0.0 0.1217 - 8.250 -0.988 0.0 0.1214 - 8.260 -0.808 0.0 0.1211 - 8.270 -0.624 0.0 0.1209 - 8.280 -0.445 0.0 0.1209 - 8.290 -0.282 0.0 0.1210 - 8.300 -0.144 0.0 0.1213 - 8.310 -0.038 0.0 0.1216 - 8.320 0.030 0.0 0.1218 - 8.330 0.056 0.0 0.1218 - 8.340 0.039 0.0 0.1216 - 8.350 -0.020 0.0 0.1214 - 8.360 -0.119 0.0 0.1211 - 8.370 -0.253 0.0 0.1210 - 8.380 -0.415 0.0 0.1209 - 8.390 -0.598 0.0 0.1211 - 8.400 -0.794 0.0 0.1214 - 8.410 -0.996 0.0 0.1216 - 8.420 -1.195 0.0 0.1217 - 8.430 -1.387 0.0 0.1217 - 8.440 -1.565 0.0 0.1216 - 8.450 -1.725 0.0 0.1213 - 8.460 -1.864 0.0 0.1211 - 8.470 -1.980 0.0 0.1210 - 8.480 -2.073 0.0 0.1210 - 8.490 -2.143 0.0 0.1211 - 8.500 -2.189 0.0 0.1214 - 8.510 -2.213 0.0 0.1216 - 8.520 -2.215 0.0 0.1217 - 8.530 -2.196 0.0 0.1217 - 8.540 -2.156 0.0 0.1215 - 8.550 -2.096 0.0 0.1213 - 8.560 -2.016 0.0 0.1210 - 8.570 -1.916 0.0 0.1210 - 8.580 -1.798 0.0 0.1210 - 8.590 -1.664 0.0 0.1212 - 8.600 -1.516 0.0 0.1214 - 8.610 -1.358 0.0 0.1216 - 8.620 -1.194 0.0 0.1217 - 8.630 -1.030 0.0 0.1216 - 8.640 -0.872 0.0 0.1214 - 8.650 -0.728 0.0 0.1212 - 8.660 -0.604 0.0 0.1210 - 8.670 -0.508 0.0 0.1210 - 8.680 -0.446 0.0 0.1211 - 8.690 -0.423 0.0 0.1213 - 8.700 -0.442 0.0 0.1215 - 8.710 -0.505 0.0 0.1217 - 8.720 -0.611 0.0 0.1217 - 8.730 -0.758 0.0 0.1216 - 8.740 -0.941 0.0 0.1214 - 8.750 -1.154 0.0 0.1211 - 8.760 -1.387 0.0 0.1210 - 8.770 -1.633 0.0 0.1210 - 8.780 -1.883 0.0 0.1211 - 8.790 -2.127 0.0 0.1213 - 8.800 -2.357 0.0 0.1215 - 8.810 -2.568 0.0 0.1216 - 8.820 -2.753 0.0 0.1216 - 8.830 -2.911 0.0 0.1215 - 8.840 -3.041 0.0 0.1212 - 8.850 -3.144 0.0 0.1210 - 8.860 -3.222 0.0 0.1209 - 8.870 -3.280 0.0 0.1210 - 8.880 -3.323 0.0 0.1212 - 8.890 -3.357 0.0 0.1214 - 8.900 -3.384 0.0 0.1216 - 8.910 -3.411 0.0 0.1217 - 8.920 -3.438 0.0 0.1216 - 8.930 -3.467 0.0 0.1214 - 8.940 -3.498 0.0 0.1212 - 8.950 -3.529 0.0 0.1209 - 8.960 -3.554 0.0 0.1208 - 8.970 -3.571 0.0 0.1209 - 8.980 -3.574 0.0 0.1211 - 8.990 -3.556 0.0 0.1214 - 9.000 -3.515 0.0 0.1216 - 9.010 -3.445 0.0 0.1217 - 9.020 -3.346 0.0 0.1216 - 9.030 -3.215 0.0 0.1214 - 9.040 -3.055 0.0 0.1211 - 9.050 -2.869 0.0 0.1209 - 9.060 -2.661 0.0 0.1208 - 9.070 -2.438 0.0 0.1209 - 9.080 -2.207 0.0 0.1212 - 9.090 -1.976 0.0 0.1214 - 9.100 -1.752 0.0 0.1216 - 9.110 -1.542 0.0 0.1217 - 9.120 -1.351 0.0 0.1216 - 9.130 -1.183 0.0 0.1214 - 9.140 -1.041 0.0 0.1211 - 9.150 -0.925 0.0 0.1209 - 9.160 -0.835 0.0 0.1209 - 9.170 -0.768 0.0 0.1210 - 9.180 -0.720 0.0 0.1212 - 9.190 -0.688 0.0 0.1215 - 9.200 -0.666 0.0 0.1217 - 9.210 -0.651 0.0 0.1217 - 9.220 -0.638 0.0 0.1216 - 9.230 -0.626 0.0 0.1214 - 9.240 -0.611 0.0 0.1211 - 9.250 -0.593 0.0 0.1209 - 9.260 -0.572 0.0 0.1209 - 9.270 -0.546 0.0 0.1210 - 9.280 -0.518 0.0 0.1212 - 9.290 -0.487 0.0 0.1215 - 9.300 -0.453 0.0 0.1217 - 9.310 -0.416 0.0 0.1217 - 9.320 -0.372 0.0 0.1216 - 9.330 -0.320 0.0 0.1213 - 9.340 -0.255 0.0 0.1211 - 9.350 -0.172 0.0 0.1209 - 9.360 -0.066 0.0 0.1209 - 9.370 0.070 0.0 0.1211 - 9.380 0.241 0.0 0.1213 - 9.390 0.451 0.0 0.1215 - 9.400 0.704 0.0 0.1217 - 9.410 1.001 0.0 0.1217 - 9.420 1.341 0.0 0.1215 - 9.430 1.721 0.0 0.1213 - 9.440 2.135 0.0 0.1211 - 9.450 2.576 0.0 0.1210 - 9.460 3.035 0.0 0.1210 - 9.470 3.500 0.0 0.1211 - 9.480 3.959 0.0 0.1214 - 9.490 4.403 0.0 0.1216 - 9.500 4.819 0.0 0.1217 - 9.510 5.199 0.0 0.1217 - 9.520 5.536 0.0 0.1215 - 9.530 5.823 0.0 0.1213 - 9.540 6.060 0.0 0.1210 - 9.550 6.246 0.0 0.1209 - 9.560 6.384 0.0 0.1210 - 9.570 6.477 0.0 0.1211 - 9.580 6.533 0.0 0.1214 - 9.590 6.558 0.0 0.1216 - 9.600 6.558 0.0 0.1217 - 9.610 6.541 0.0 0.1216 - 9.620 6.512 0.0 0.1215 - 9.630 6.474 0.0 0.1212 - 9.640 6.430 0.0 0.1210 - 9.650 6.379 0.0 0.1210 - 9.660 6.321 0.0 0.1210 - 9.670 6.251 0.0 0.1212 - 9.680 6.166 0.0 0.1215 - 9.690 6.060 0.0 0.1216 - 9.700 5.929 0.0 0.1217 - 9.710 5.768 0.0 0.1216 - 9.720 5.574 0.0 0.1214 - 9.730 5.346 0.0 0.1212 - 9.740 5.085 0.0 0.1210 - 9.750 4.792 0.0 0.1210 - 9.760 4.472 0.0 0.1211 - 9.770 4.132 0.0 0.1213 - 9.780 3.778 0.0 0.1215 - 9.790 3.420 0.0 0.1216 - 9.800 3.065 0.0 0.1217 - 9.810 2.722 0.0 0.1216 - 9.820 2.398 0.0 0.1214 - 9.830 2.098 0.0 0.1211 - 9.840 1.826 0.0 0.1210 - 9.850 1.584 0.0 0.1210 - 9.860 1.371 0.0 0.1211 - 9.870 1.185 0.0 0.1213 - 9.880 1.021 0.0 0.1215 - 9.890 0.875 0.0 0.1217 - 9.900 0.741 0.0 0.1216 - 9.910 0.613 0.0 0.1215 - 9.920 0.485 0.0 0.1213 - 9.930 0.354 0.0 0.1211 - 9.940 0.216 0.0 0.1210 - 9.950 0.070 0.0 0.1210 - 9.960 -0.084 0.0 0.1211 - 9.970 -0.244 0.0 0.1213 - 9.980 -0.408 0.0 0.1215 - 9.990 -0.570 0.0 0.1217 - 10.000 -0.727 0.0 0.1216 - 10.010 -0.872 0.0 0.1215 - 10.020 -1.002 0.0 0.1212 - 10.030 -1.112 0.0 0.1210 - 10.040 -1.200 0.0 0.1209 - 10.050 -1.262 0.0 0.1210 - 10.060 -1.299 0.0 0.1212 - 10.070 -1.312 0.0 0.1214 - 10.080 -1.300 0.0 0.1216 - 10.090 -1.268 0.0 0.1217 - 10.100 -1.216 0.0 0.1216 - 10.110 -1.148 0.0 0.1214 - 10.120 -1.065 0.0 0.1212 - 10.130 -0.970 0.0 0.1210 - 10.140 -0.863 0.0 0.1209 - 10.150 -0.744 0.0 0.1210 - 10.160 -0.612 0.0 0.1212 - 10.170 -0.465 0.0 0.1214 - 10.180 -0.303 0.0 0.1216 - 10.190 -0.123 0.0 0.1217 - 10.200 0.075 0.0 0.1216 - 10.210 0.293 0.0 0.1214 - 10.220 0.529 0.0 0.1212 - 10.230 0.781 0.0 0.1210 - 10.240 1.044 0.0 0.1209 - 10.250 1.314 0.0 0.1210 - 10.260 1.582 0.0 0.1212 - 10.270 1.841 0.0 0.1214 - 10.280 2.081 0.0 0.1216 - 10.290 2.293 0.0 0.1217 - 10.300 2.466 0.0 0.1216 - 10.310 2.593 0.0 0.1213 - 10.320 2.666 0.0 0.1211 - 10.330 2.679 0.0 0.1209 - 10.340 2.630 0.0 0.1209 - 10.350 2.518 0.0 0.1210 - 10.360 2.343 0.0 0.1212 - 10.370 2.109 0.0 0.1215 - 10.380 1.822 0.0 0.1216 - 10.390 1.489 0.0 0.1217 - 10.400 1.119 0.0 0.1215 - 10.410 0.718 0.0 0.1213 - 10.420 0.298 0.0 0.1211 - 10.430 -0.135 0.0 0.1209 - 10.440 -0.574 0.0 0.1209 - 10.450 -1.012 0.0 0.1210 - 10.460 -1.444 0.0 0.1212 - 10.470 -1.868 0.0 0.1214 - 10.480 -2.282 0.0 0.1216 - 10.490 -2.685 0.0 0.1216 - 10.500 -3.077 0.0 0.1215 - 10.510 -3.458 0.0 0.1213 - 10.520 -3.829 0.0 0.1211 - 10.530 -4.190 0.0 0.1210 - 10.540 -4.541 0.0 0.1210 - 10.550 -4.879 0.0 0.1211 - 10.560 -5.204 0.0 0.1213 - 10.570 -5.511 0.0 0.1215 - 10.580 -5.797 0.0 0.1217 - 10.590 -6.059 0.0 0.1216 - 10.600 -6.290 0.0 0.1215 - 10.610 -6.489 0.0 0.1213 - 10.620 -6.650 0.0 0.1211 - 10.630 -6.771 0.0 0.1210 - 10.640 -6.850 0.0 0.1210 - 10.650 -6.888 0.0 0.1211 - 10.660 -6.886 0.0 0.1214 - 10.670 -6.845 0.0 0.1216 - 10.680 -6.769 0.0 0.1217 - 10.690 -6.663 0.0 0.1216 - 10.700 -6.532 0.0 0.1215 - 10.710 -6.380 0.0 0.1213 - 10.720 -6.212 0.0 0.1211 - 10.730 -6.032 0.0 0.1210 - 10.740 -5.844 0.0 0.1211 - 10.750 -5.648 0.0 0.1212 - 10.760 -5.445 0.0 0.1214 - 10.770 -5.234 0.0 0.1216 - 10.780 -5.013 0.0 0.1217 - 10.790 -4.780 0.0 0.1216 - 10.800 -4.529 0.0 0.1214 - 10.810 -4.257 0.0 0.1212 - 10.820 -3.959 0.0 0.1211 - 10.830 -3.633 0.0 0.1210 - 10.840 -3.274 0.0 0.1211 - 10.850 -2.880 0.0 0.1213 - 10.860 -2.452 0.0 0.1215 - 10.870 -1.989 0.0 0.1216 - 10.880 -1.494 0.0 0.1217 - 10.890 -0.970 0.0 0.1215 - 10.900 -0.421 0.0 0.1214 - 10.910 0.147 0.0 0.1211 - 10.920 0.727 0.0 0.1210 - 10.930 1.315 0.0 0.1210 - 10.940 1.901 0.0 0.1211 - 10.950 2.481 0.0 0.1213 - 10.960 3.047 0.0 0.1215 - 10.970 3.594 0.0 0.1217 - 10.980 4.115 0.0 0.1217 - 10.990 4.605 0.0 0.1216 - 11.000 5.060 0.0 0.1214 - 11.010 5.475 0.0 0.1212 - 11.020 5.846 0.0 0.1210 - 11.030 6.169 0.0 0.1210 - 11.040 6.441 0.0 0.1211 - 11.050 6.658 0.0 0.1213 - 11.060 6.817 0.0 0.1215 - 11.070 6.915 0.0 0.1216 - 11.080 6.950 0.0 0.1216 - 11.090 6.919 0.0 0.1215 - 11.100 6.823 0.0 0.1213 - 11.110 6.661 0.0 0.1211 - 11.120 6.434 0.0 0.1210 - 11.130 6.144 0.0 0.1210 - 11.140 5.793 0.0 0.1212 - 11.150 5.386 0.0 0.1214 - 11.160 4.929 0.0 0.1215 - 11.170 4.427 0.0 0.1216 - 11.180 3.888 0.0 0.1216 - 11.190 3.318 0.0 0.1214 - 11.200 2.725 0.0 0.1212 - 11.210 2.117 0.0 0.1211 - 11.220 1.502 0.0 0.1210 - 11.230 0.885 0.0 0.1210 - 11.240 0.272 0.0 0.1212 - 11.250 -0.330 0.0 0.1213 - 11.260 -0.918 0.0 0.1215 - 11.270 -1.488 0.0 0.1215 - 11.280 -2.037 0.0 0.1215 - 11.290 -2.563 0.0 0.1213 - 11.300 -3.065 0.0 0.1211 - 11.310 -3.539 0.0 0.1210 - 11.320 -3.986 0.0 0.1209 - 11.330 -4.404 0.0 0.1210 - 11.340 -4.791 0.0 0.1212 - 11.350 -5.146 0.0 0.1214 - 11.360 -5.467 0.0 0.1216 - 11.370 -5.752 0.0 0.1216 - 11.380 -5.999 0.0 0.1215 - 11.390 -6.206 0.0 0.1213 - 11.400 -6.371 0.0 0.1211 - 11.410 -6.493 0.0 0.1210 - 11.420 -6.571 0.0 0.1209 - 11.430 -6.605 0.0 0.1210 - 11.440 -6.595 0.0 0.1212 - 11.450 -6.543 0.0 0.1214 - 11.460 -6.450 0.0 0.1216 - 11.470 -6.319 0.0 0.1216 - 11.480 -6.154 0.0 0.1215 - 11.490 -5.958 0.0 0.1213 - 11.500 -5.735 0.0 0.1211 - 11.510 -5.488 0.0 0.1210 - 11.520 -5.222 0.0 0.1210 - 11.530 -4.940 0.0 0.1211 - 11.540 -4.646 0.0 0.1213 - 11.550 -4.342 0.0 0.1215 - 11.560 -4.031 0.0 0.1216 - 11.570 -3.713 0.0 0.1216 - 11.580 -3.391 0.0 0.1215 - 11.590 -3.064 0.0 0.1213 - 11.600 -2.734 0.0 0.1211 - 11.610 -2.399 0.0 0.1210 - 11.620 -2.062 0.0 0.1210 - 11.630 -1.720 0.0 0.1211 - 11.640 -1.375 0.0 0.1213 - 11.650 -1.026 0.0 0.1215 - 11.660 -0.673 0.0 0.1216 - 11.670 -0.319 0.0 0.1216 - 11.680 0.038 0.0 0.1215 - 11.690 0.395 0.0 0.1212 - 11.700 0.752 0.0 0.1210 - 11.710 1.106 0.0 0.1210 - 11.720 1.456 0.0 0.1210 - 11.730 1.800 0.0 0.1212 - 11.740 2.136 0.0 0.1214 - 11.750 2.461 0.0 0.1216 - 11.760 2.774 0.0 0.1217 - 11.770 3.071 0.0 0.1216 - 11.780 3.351 0.0 0.1215 - 11.790 3.611 0.0 0.1213 - 11.800 3.849 0.0 0.1211 - 11.810 4.063 0.0 0.1210 - 11.820 4.251 0.0 0.1210 - 11.830 4.411 0.0 0.1212 - 11.840 4.542 0.0 0.1214 - 11.850 4.644 0.0 0.1216 - 11.860 4.718 0.0 0.1216 - 11.870 4.763 0.0 0.1215 - 11.880 4.782 0.0 0.1214 - 11.890 4.776 0.0 0.1212 - 11.900 4.749 0.0 0.1210 - 11.910 4.704 0.0 0.1210 - 11.920 4.644 0.0 0.1211 - 11.930 4.574 0.0 0.1213 - 11.940 4.496 0.0 0.1215 - 11.950 4.416 0.0 0.1217 - 11.960 4.334 0.0 0.1217 - 11.970 4.254 0.0 0.1216 - 11.980 4.177 0.0 0.1214 - 11.990 4.102 0.0 0.1212 - 12.000 4.030 0.0 0.1211 - 12.010 3.959 0.0 0.1210 - 12.020 3.886 0.0 0.1211 - 12.030 3.809 0.0 0.1213 - 12.040 3.725 0.0 0.1215 - 12.050 3.631 0.0 0.1216 - 12.060 3.524 0.0 0.1217 - 12.070 3.403 0.0 0.1216 - 12.080 3.266 0.0 0.1214 - 12.090 3.115 0.0 0.1212 - 12.100 2.950 0.0 0.1211 - 12.110 2.775 0.0 0.1211 - 12.120 2.593 0.0 0.1212 - 12.130 2.411 0.0 0.1214 - 12.140 2.233 0.0 0.1215 - 12.150 2.066 0.0 0.1216 - 12.160 1.916 0.0 0.1216 - 12.170 1.789 0.0 0.1215 - 12.180 1.690 0.0 0.1213 - 12.190 1.622 0.0 0.1211 - 12.200 1.587 0.0 0.1210 - 12.210 1.587 0.0 0.1210 - 12.220 1.620 0.0 0.1211 - 12.230 1.684 0.0 0.1213 - 12.240 1.774 0.0 0.1215 - 12.250 1.886 0.0 0.1216 - 12.260 2.013 0.0 0.1216 - 12.270 2.150 0.0 0.1215 - 12.280 2.290 0.0 0.1213 - 12.290 2.427 0.0 0.1211 - 12.300 2.556 0.0 0.1210 - 12.310 2.673 0.0 0.1210 - 12.320 2.775 0.0 0.1212 - 12.330 2.860 0.0 0.1213 - 12.340 2.928 0.0 0.1215 - 12.350 2.979 0.0 0.1215 - 12.360 3.015 0.0 0.1215 - 12.370 3.036 0.0 0.1214 - 12.380 3.046 0.0 0.1212 - 12.390 3.045 0.0 0.1211 - 12.400 3.035 0.0 0.1210 - 12.410 3.016 0.0 0.1211 - 12.420 2.987 0.0 0.1212 - 12.430 2.947 0.0 0.1214 - 12.440 2.894 0.0 0.1215 - 12.450 2.825 0.0 0.1216 - 12.460 2.736 0.0 0.1215 - 12.470 2.625 0.0 0.1213 - 12.480 2.488 0.0 0.1211 - 12.490 2.322 0.0 0.1210 - 12.500 2.127 0.0 0.1209 - 12.510 1.901 0.0 0.1210 - 12.520 1.647 0.0 0.1212 - 12.530 1.367 0.0 0.1214 - 12.540 1.064 0.0 0.1215 - 12.550 0.745 0.0 0.1215 - 12.560 0.416 0.0 0.1214 - 12.570 0.083 0.0 0.1213 - 12.580 -0.245 0.0 0.1211 - 12.590 -0.561 0.0 0.1210 - 12.600 -0.858 0.0 0.1210 - 12.610 -1.131 0.0 0.1211 - 12.620 -1.376 0.0 0.1213 - 12.630 -1.588 0.0 0.1215 - 12.640 -1.767 0.0 0.1216 - 12.650 -1.912 0.0 0.1216 - 12.660 -2.026 0.0 0.1214 - 12.670 -2.111 0.0 0.1212 - 12.680 -2.172 0.0 0.1210 - 12.690 -2.212 0.0 0.1209 - 12.700 -2.237 0.0 0.1210 - 12.710 -2.251 0.0 0.1211 - 12.720 -2.259 0.0 0.1213 - 12.730 -2.264 0.0 0.1215 - 12.740 -2.269 0.0 0.1216 - 12.750 -2.276 0.0 0.1216 - 12.760 -2.285 0.0 0.1215 - 12.770 -2.297 0.0 0.1213 - 12.780 -2.310 0.0 0.1211 - 12.790 -2.324 0.0 0.1210 - 12.800 -2.336 0.0 0.1210 - 12.810 -2.345 0.0 0.1212 - 12.820 -2.350 0.0 0.1214 - 12.830 -2.349 0.0 0.1216 - 12.840 -2.343 0.0 0.1216 - 12.850 -2.333 0.0 0.1216 - 12.860 -2.319 0.0 0.1214 - 12.870 -2.303 0.0 0.1212 - 12.880 -2.289 0.0 0.1211 - 12.890 -2.279 0.0 0.1210 - 12.900 -2.275 0.0 0.1210 - 12.910 -2.282 0.0 0.1212 - 12.920 -2.301 0.0 0.1214 - 12.930 -2.333 0.0 0.1216 - 12.940 -2.381 0.0 0.1217 - 12.950 -2.444 0.0 0.1216 - 12.960 -2.521 0.0 0.1215 - 12.970 -2.612 0.0 0.1212 - 12.980 -2.712 0.0 0.1210 - 12.990 -2.820 0.0 0.1210 - 13.000 -2.931 0.0 0.1210 - 13.010 -3.043 0.0 0.1212 - 13.020 -3.150 0.0 0.1214 - 13.030 -3.251 0.0 0.1216 - 13.040 -3.342 0.0 0.1217 - 13.050 -3.420 0.0 0.1216 - 13.060 -3.485 0.0 0.1215 - 13.070 -3.535 0.0 0.1213 - 13.080 -3.570 0.0 0.1211 - 13.090 -3.592 0.0 0.1210 - 13.100 -3.601 0.0 0.1211 - 13.110 -3.599 0.0 0.1212 - 13.120 -3.589 0.0 0.1214 - 13.130 -3.571 0.0 0.1216 - 13.140 -3.549 0.0 0.1216 - 13.150 -3.524 0.0 0.1216 - 13.160 -3.497 0.0 0.1214 - 13.170 -3.469 0.0 0.1212 - 13.180 -3.441 0.0 0.1211 - 13.190 -3.412 0.0 0.1210 - 13.200 -3.381 0.0 0.1211 - 13.210 -3.349 0.0 0.1213 - 13.220 -3.314 0.0 0.1215 - 13.230 -3.273 0.0 0.1216 - 13.240 -3.226 0.0 0.1216 - 13.250 -3.170 0.0 0.1216 - 13.260 -3.105 0.0 0.1214 - 13.270 -3.028 0.0 0.1212 - 13.280 -2.939 0.0 0.1211 - 13.290 -2.836 0.0 0.1210 - 13.300 -2.719 0.0 0.1211 - 13.310 -2.587 0.0 0.1213 - 13.320 -2.440 0.0 0.1214 - 13.330 -2.277 0.0 0.1215 - 13.340 -2.100 0.0 0.1216 - 13.350 -1.907 0.0 0.1215 - 13.360 -1.701 0.0 0.1213 - 13.370 -1.483 0.0 0.1212 - 13.380 -1.252 0.0 0.1211 - 13.390 -1.012 0.0 0.1211 - 13.400 -0.763 0.0 0.1212 - 13.410 -0.508 0.0 0.1213 - 13.420 -0.251 0.0 0.1215 - 13.430 0.007 0.0 0.1216 - 13.440 0.261 0.0 0.1215 - 13.450 0.507 0.0 0.1214 - 13.460 0.743 0.0 0.1212 - 13.470 0.962 0.0 0.1211 - 13.480 1.162 0.0 0.1210 - 13.490 1.338 0.0 0.1210 - 13.500 1.486 0.0 0.1212 - 13.510 1.604 0.0 0.1213 - 13.520 1.689 0.0 0.1215 - 13.530 1.739 0.0 0.1216 - 13.540 1.755 0.0 0.1215 - 13.550 1.735 0.0 0.1214 - 13.560 1.682 0.0 0.1213 - 13.570 1.599 0.0 0.1212 - 13.580 1.489 0.0 0.1211 - 13.590 1.357 0.0 0.1211 - 13.600 1.208 0.0 0.1212 - 13.610 1.047 0.0 0.1213 - 13.620 0.882 0.0 0.1214 - 13.630 0.717 0.0 0.1215 - 13.640 0.559 0.0 0.1214 - 13.650 0.412 0.0 0.1213 - 13.660 0.282 0.0 0.1211 - 13.670 0.171 0.0 0.1211 - 13.680 0.081 0.0 0.1210 - 13.690 0.014 0.0 0.1211 - 13.700 -0.031 0.0 0.1213 - 13.710 -0.054 0.0 0.1214 - 13.720 -0.059 0.0 0.1215 - 13.730 -0.048 0.0 0.1215 - 13.740 -0.025 0.0 0.1214 - 13.750 0.006 0.0 0.1213 - 13.760 0.041 0.0 0.1211 - 13.770 0.075 0.0 0.1210 - 13.780 0.105 0.0 0.1210 - 13.790 0.128 0.0 0.1211 - 13.800 0.141 0.0 0.1213 - 13.810 0.143 0.0 0.1215 - 13.820 0.131 0.0 0.1216 - 13.830 0.107 0.0 0.1215 - 13.840 0.070 0.0 0.1214 - 13.850 0.021 0.0 0.1213 - 13.860 -0.039 0.0 0.1212 - 13.870 -0.109 0.0 0.1211 - 13.880 -0.187 0.0 0.1211 - 13.890 -0.273 0.0 0.1212 - 13.900 -0.364 0.0 0.1214 - 13.910 -0.461 0.0 0.1215 - 13.920 -0.564 0.0 0.1216 - 13.930 -0.671 0.0 0.1215 - 13.940 -0.782 0.0 0.1214 - 13.950 -0.897 0.0 0.1212 - 13.960 -1.017 0.0 0.1210 - 13.970 -1.138 0.0 0.1210 - 13.980 -1.261 0.0 0.1210 - 13.990 -1.381 0.0 0.1212 - 14.000 -1.497 0.0 0.1214 - 14.010 -1.605 0.0 0.1215 - 14.020 -1.699 0.0 0.1216 - 14.030 -1.774 0.0 0.1216 - 14.040 -1.825 0.0 0.1214 - 14.050 -1.846 0.0 0.1212 - 14.060 -1.830 0.0 0.1211 - 14.070 -1.775 0.0 0.1210 - 14.080 -1.674 0.0 0.1211 - 14.090 -1.526 0.0 0.1212 - 14.100 -1.330 0.0 0.1214 - 14.110 -1.085 0.0 0.1215 - 14.120 -0.795 0.0 0.1216 - 14.130 -0.463 0.0 0.1215 - 14.140 -0.094 0.0 0.1214 - 14.150 0.302 0.0 0.1212 - 14.160 0.720 0.0 0.1211 - 14.170 1.148 0.0 0.1211 - 14.180 1.579 0.0 0.1212 - 14.190 2.002 0.0 0.1213 - 14.200 2.410 0.0 0.1215 - 14.210 2.795 0.0 0.1216 - 14.220 3.150 0.0 0.1216 - 14.230 3.470 0.0 0.1215 - 14.240 3.753 0.0 0.1214 - 14.250 3.998 0.0 0.1212 - 14.260 4.203 0.0 0.1211 - 14.270 4.370 0.0 0.1211 - 14.280 4.503 0.0 0.1212 - 14.290 4.603 0.0 0.1213 - 14.300 4.674 0.0 0.1215 - 14.310 4.722 0.0 0.1216 - 14.320 4.748 0.0 0.1216 - 14.330 4.756 0.0 0.1215 - 14.340 4.750 0.0 0.1214 - 14.350 4.732 0.0 0.1212 - 14.360 4.703 0.0 0.1211 - 14.370 4.666 0.0 0.1211 - 14.380 4.622 0.0 0.1212 - 14.390 4.572 0.0 0.1213 - 14.400 4.519 0.0 0.1215 - 14.410 4.464 0.0 0.1215 - 14.420 4.410 0.0 0.1215 - 14.430 4.361 0.0 0.1215 - 14.440 4.320 0.0 0.1213 - 14.450 4.290 0.0 0.1212 - 14.460 4.276 0.0 0.1211 - 14.470 4.282 0.0 0.1211 - 14.480 4.310 0.0 0.1212 - 14.490 4.363 0.0 0.1214 - 14.500 4.442 0.0 0.1215 - 14.510 4.546 0.0 0.1216 - 14.520 4.674 0.0 0.1216 - 14.530 4.820 0.0 0.1215 - 14.540 4.980 0.0 0.1213 - 14.550 5.145 0.0 0.1211 - 14.560 5.308 0.0 0.1211 - 14.570 5.460 0.0 0.1211 - 14.580 5.591 0.0 0.1212 - 14.590 5.691 0.0 0.1213 - 14.600 5.752 0.0 0.1214 - 14.610 5.768 0.0 0.1215 - 14.620 5.734 0.0 0.1214 - 14.630 5.646 0.0 0.1213 - 14.640 5.503 0.0 0.1212 - 14.650 5.307 0.0 0.1211 - 14.660 5.063 0.0 0.1210 - 14.670 4.775 0.0 0.1211 - 14.680 4.451 0.0 0.1212 - 14.690 4.098 0.0 0.1214 - 14.700 3.724 0.0 0.1215 - 14.710 3.337 0.0 0.1215 - 14.720 2.945 0.0 0.1215 - 14.730 2.554 0.0 0.1213 - 14.740 2.166 0.0 0.1212 - 14.750 1.786 0.0 0.1211 - 14.760 1.414 0.0 0.1211 - 14.770 1.049 0.0 0.1211 - 14.780 0.689 0.0 0.1213 - 14.790 0.333 0.0 0.1214 - 14.800 -0.023 0.0 0.1215 - 14.810 -0.383 0.0 0.1215 - 14.820 -0.746 0.0 0.1215 - 14.830 -1.116 0.0 0.1213 - 14.840 -1.491 0.0 0.1212 - 14.850 -1.869 0.0 0.1211 - 14.860 -2.248 0.0 0.1211 - 14.870 -2.622 0.0 0.1211 - 14.880 -2.986 0.0 0.1213 - 14.890 -3.333 0.0 0.1214 - 14.900 -3.657 0.0 0.1215 - 14.910 -3.952 0.0 0.1215 - 14.920 -4.213 0.0 0.1214 - 14.930 -4.434 0.0 0.1213 - 14.940 -4.615 0.0 0.1212 - 14.950 -4.754 0.0 0.1211 - 14.960 -4.852 0.0 0.1211 - 14.970 -4.914 0.0 0.1212 - 14.980 -4.942 0.0 0.1213 - 14.990 -4.942 0.0 0.1215 - 15.000 -4.921 0.0 0.1215 - 15.010 -4.884 0.0 0.1215 - 15.020 -4.837 0.0 0.1214 - 15.030 -4.785 0.0 0.1213 - 15.040 -4.730 0.0 0.1211 - 15.050 -4.676 0.0 0.1211 - 15.060 -4.622 0.0 0.1211 - 15.070 -4.568 0.0 0.1212 - 15.080 -4.511 0.0 0.1213 - 15.090 -4.449 0.0 0.1215 - 15.100 -4.380 0.0 0.1215 - 15.110 -4.299 0.0 0.1215 - 15.120 -4.204 0.0 0.1214 - 15.130 -4.096 0.0 0.1212 - 15.140 -3.973 0.0 0.1211 - 15.150 -3.838 0.0 0.1211 - 15.160 -3.693 0.0 0.1211 - 15.170 -3.544 0.0 0.1213 - 15.180 -3.397 0.0 0.1214 - 15.190 -3.257 0.0 0.1215 - 15.200 -3.131 0.0 0.1215 - 15.210 -3.025 0.0 0.1215 - 15.220 -2.943 0.0 0.1213 - 15.230 -2.888 0.0 0.1212 - 15.240 -2.862 0.0 0.1211 - 15.250 -2.863 0.0 0.1211 - 15.260 -2.888 0.0 0.1212 - 15.270 -2.931 0.0 0.1213 - 15.280 -2.986 0.0 0.1215 - 15.290 -3.044 0.0 0.1216 - 15.300 -3.097 0.0 0.1216 - 15.310 -3.137 0.0 0.1215 - 15.320 -3.155 0.0 0.1213 - 15.330 -3.146 0.0 0.1212 - 15.340 -3.106 0.0 0.1211 - 15.350 -3.035 0.0 0.1211 - 15.360 -2.932 0.0 0.1212 - 15.370 -2.804 0.0 0.1213 - 15.380 -2.654 0.0 0.1215 - 15.390 -2.492 0.0 0.1216 - 15.400 -2.326 0.0 0.1216 - 15.410 -2.165 0.0 0.1215 - 15.420 -2.018 0.0 0.1213 - 15.430 -1.892 0.0 0.1212 - 15.440 -1.793 0.0 0.1211 - 15.450 -1.725 0.0 0.1211 - 15.460 -1.687 0.0 0.1212 - 15.470 -1.677 0.0 0.1214 - 15.480 -1.690 0.0 0.1215 - 15.490 -1.720 0.0 0.1216 - 15.500 -1.757 0.0 0.1216 - 15.510 -1.793 0.0 0.1215 - 15.520 -1.819 0.0 0.1213 - 15.530 -1.825 0.0 0.1212 - 15.540 -1.806 0.0 0.1211 - 15.550 -1.757 0.0 0.1211 - 15.560 -1.677 0.0 0.1212 - 15.570 -1.566 0.0 0.1214 - 15.580 -1.430 0.0 0.1215 - 15.590 -1.273 0.0 0.1216 - 15.600 -1.106 0.0 0.1215 - 15.610 -0.939 0.0 0.1214 - 15.620 -0.782 0.0 0.1213 - 15.630 -0.645 0.0 0.1211 - 15.640 -0.537 0.0 0.1211 - 15.650 -0.467 0.0 0.1211 - 15.660 -0.437 0.0 0.1212 - 15.670 -0.450 0.0 0.1214 - 15.680 -0.505 0.0 0.1215 - 15.690 -0.596 0.0 0.1216 - 15.700 -0.716 0.0 0.1215 - 15.710 -0.857 0.0 0.1214 - 15.720 -1.006 0.0 0.1212 - 15.730 -1.152 0.0 0.1211 - 15.740 -1.284 0.0 0.1210 - 15.750 -1.392 0.0 0.1211 - 15.760 -1.465 0.0 0.1212 - 15.770 -1.498 0.0 0.1214 - 15.780 -1.486 0.0 0.1215 - 15.790 -1.428 0.0 0.1215 - 15.800 -1.325 0.0 0.1215 - 15.810 -1.181 0.0 0.1213 - 15.820 -1.001 0.0 0.1212 - 15.830 -0.793 0.0 0.1211 - 15.840 -0.564 0.0 0.1210 - 15.850 -0.323 0.0 0.1211 - 15.860 -0.078 0.0 0.1212 - 15.870 0.164 0.0 0.1214 - 15.880 0.398 0.0 0.1215 - 15.890 0.619 0.0 0.1215 - 15.900 0.824 0.0 0.1214 - 15.910 1.010 0.0 0.1213 - 15.920 1.178 0.0 0.1211 - 15.930 1.328 0.0 0.1210 - 15.940 1.459 0.0 0.1210 - 15.950 1.574 0.0 0.1211 - 15.960 1.671 0.0 0.1212 - 15.970 1.752 0.0 0.1214 - 15.980 1.815 0.0 0.1215 - 15.990 1.860 0.0 0.1215 - 16.000 1.884 0.0 0.1214 - 16.010 1.885 0.0 0.1213 - 16.020 1.861 0.0 0.1212 - 16.030 1.810 0.0 0.1211 - 16.040 1.731 0.0 0.1211 - 16.050 1.623 0.0 0.1212 - 16.060 1.488 0.0 0.1213 - 16.070 1.326 0.0 0.1214 - 16.080 1.143 0.0 0.1215 - 16.090 0.942 0.0 0.1215 - 16.100 0.731 0.0 0.1214 - 16.110 0.516 0.0 0.1213 - 16.120 0.305 0.0 0.1211 - 16.130 0.106 0.0 0.1211 - 16.140 -0.075 0.0 0.1211 - 16.150 -0.230 0.0 0.1212 - 16.160 -0.355 0.0 0.1213 - 16.170 -0.444 0.0 0.1215 - 16.180 -0.496 0.0 0.1215 - 16.190 -0.510 0.0 0.1215 - 16.200 -0.484 0.0 0.1214 - 16.210 -0.421 0.0 0.1212 - 16.220 -0.323 0.0 0.1211 - 16.230 -0.192 0.0 0.1211 - 16.240 -0.032 0.0 0.1211 - 16.250 0.155 0.0 0.1212 - 16.260 0.366 0.0 0.1213 - 16.270 0.599 0.0 0.1215 - 16.280 0.852 0.0 0.1215 - 16.290 1.124 0.0 0.1215 - 16.300 1.413 0.0 0.1214 - 16.310 1.720 0.0 0.1212 - 16.320 2.042 0.0 0.1211 - 16.330 2.378 0.0 0.1211 - 16.340 2.725 0.0 0.1212 - 16.350 3.079 0.0 0.1213 - 16.360 3.437 0.0 0.1215 - 16.370 3.793 0.0 0.1216 - 16.380 4.141 0.0 0.1216 - 16.390 4.475 0.0 0.1215 - 16.400 4.786 0.0 0.1214 - 16.410 5.070 0.0 0.1212 - 16.420 5.319 0.0 0.1211 - 16.430 5.529 0.0 0.1211 - 16.440 5.696 0.0 0.1212 - 16.450 5.818 0.0 0.1213 - 16.460 5.897 0.0 0.1214 - 16.470 5.932 0.0 0.1215 - 16.480 5.929 0.0 0.1215 - 16.490 5.891 0.0 0.1215 - 16.500 5.825 0.0 0.1213 - 16.510 5.736 0.0 0.1212 - 16.520 5.630 0.0 0.1211 - 16.530 5.513 0.0 0.1211 - 16.540 5.388 0.0 0.1212 - 16.550 5.258 0.0 0.1213 - 16.560 5.123 0.0 0.1215 - 16.570 4.982 0.0 0.1215 - 16.580 4.832 0.0 0.1215 - 16.590 4.669 0.0 0.1214 - 16.600 4.487 0.0 0.1213 - 16.610 4.280 0.0 0.1212 - 16.620 4.045 0.0 0.1211 - 16.630 3.776 0.0 0.1211 - 16.640 3.472 0.0 0.1212 - 16.650 3.131 0.0 0.1214 - 16.660 2.757 0.0 0.1215 - 16.670 2.352 0.0 0.1216 - 16.680 1.925 0.0 0.1215 - 16.690 1.484 0.0 0.1214 - 16.700 1.040 0.0 0.1213 - 16.710 0.603 0.0 0.1212 - 16.720 0.185 0.0 0.1211 - 16.730 -0.203 0.0 0.1211 - 16.740 -0.553 0.0 0.1212 - 16.750 -0.856 0.0 0.1213 - 16.760 -1.110 0.0 0.1215 - 16.770 -1.313 0.0 0.1215 - 16.780 -1.465 0.0 0.1215 - 16.790 -1.573 0.0 0.1214 - 16.800 -1.643 0.0 0.1212 - 16.810 -1.684 0.0 0.1211 - 16.820 -1.705 0.0 0.1211 - 16.830 -1.716 0.0 0.1212 - 16.840 -1.727 0.0 0.1213 - 16.850 -1.746 0.0 0.1214 - 16.860 -1.778 0.0 0.1215 - 16.870 -1.826 0.0 0.1215 - 16.880 -1.892 0.0 0.1214 - 16.890 -1.972 0.0 0.1213 - 16.900 -2.062 0.0 0.1212 - 16.910 -2.154 0.0 0.1211 - 16.920 -2.241 0.0 0.1211 - 16.930 -2.313 0.0 0.1211 - 16.940 -2.362 0.0 0.1213 - 16.950 -2.379 0.0 0.1214 - 16.960 -2.360 0.0 0.1215 - 16.970 -2.299 0.0 0.1215 - 16.980 -2.197 0.0 0.1214 - 16.990 -2.055 0.0 0.1213 - 17.000 -1.878 0.0 0.1212 - 17.010 -1.673 0.0 0.1211 - 17.020 -1.449 0.0 0.1211 - 17.030 -1.216 0.0 0.1212 - 17.040 -0.985 0.0 0.1213 - 17.050 -0.766 0.0 0.1214 - 17.060 -0.568 0.0 0.1215 - 17.070 -0.398 0.0 0.1215 - 17.080 -0.261 0.0 0.1214 - 17.090 -0.159 0.0 0.1212 - 17.100 -0.093 0.0 0.1211 - 17.110 -0.060 0.0 0.1210 - 17.120 -0.056 0.0 0.1211 - 17.130 -0.073 0.0 0.1212 - 17.140 -0.105 0.0 0.1213 - 17.150 -0.146 0.0 0.1215 - 17.160 -0.187 0.0 0.1215 - 17.170 -0.223 0.0 0.1215 - 17.180 -0.250 0.0 0.1214 - 17.190 -0.266 0.0 0.1213 - 17.200 -0.270 0.0 0.1211 - 17.210 -0.264 0.0 0.1211 - 17.220 -0.252 0.0 0.1211 - 17.230 -0.237 0.0 0.1212 - 17.240 -0.226 0.0 0.1213 - 17.250 -0.225 0.0 0.1215 - 17.260 -0.238 0.0 0.1215 - 17.270 -0.270 0.0 0.1215 - 17.280 -0.325 0.0 0.1214 - 17.290 -0.405 0.0 0.1212 - 17.300 -0.509 0.0 0.1211 - 17.310 -0.636 0.0 0.1211 - 17.320 -0.782 0.0 0.1211 - 17.330 -0.943 0.0 0.1213 - 17.340 -1.114 0.0 0.1214 - 17.350 -1.289 0.0 0.1215 - 17.360 -1.462 0.0 0.1216 - 17.370 -1.629 0.0 0.1215 - 17.380 -1.783 0.0 0.1214 - 17.390 -1.923 0.0 0.1212 - 17.400 -2.046 0.0 0.1211 - 17.410 -2.151 0.0 0.1211 - 17.420 -2.237 0.0 0.1211 - 17.430 -2.307 0.0 0.1213 - 17.440 -2.360 0.0 0.1214 - 17.450 -2.399 0.0 0.1215 - 17.460 -2.425 0.0 0.1216 - 17.470 -2.439 0.0 0.1215 - 17.480 -2.441 0.0 0.1214 - 17.490 -2.431 0.0 0.1213 - 17.500 -2.407 0.0 0.1211 - 17.510 -2.369 0.0 0.1211 - 17.520 -2.313 0.0 0.1212 - 17.530 -2.239 0.0 0.1213 - 17.540 -2.145 0.0 0.1214 - 17.550 -2.031 0.0 0.1215 - 17.560 -1.896 0.0 0.1215 - 17.570 -1.743 0.0 0.1215 - 17.580 -1.575 0.0 0.1213 - 17.590 -1.397 0.0 0.1212 - 17.600 -1.216 0.0 0.1211 - 17.610 -1.038 0.0 0.1211 - 17.620 -0.873 0.0 0.1212 - 17.630 -0.727 0.0 0.1213 - 17.640 -0.610 0.0 0.1215 - 17.650 -0.528 0.0 0.1216 - 17.660 -0.486 0.0 0.1216 - 17.670 -0.488 0.0 0.1215 - 17.680 -0.536 0.0 0.1214 - 17.690 -0.628 0.0 0.1212 - 17.700 -0.761 0.0 0.1211 - 17.710 -0.930 0.0 0.1211 - 17.720 -1.127 0.0 0.1212 - 17.730 -1.343 0.0 0.1213 - 17.740 -1.570 0.0 0.1215 - 17.750 -1.797 0.0 0.1215 - 17.760 -2.015 0.0 0.1215 - 17.770 -2.217 0.0 0.1214 - 17.780 -2.396 0.0 0.1213 - 17.790 -2.547 0.0 0.1211 - 17.800 -2.666 0.0 0.1211 - 17.810 -2.754 0.0 0.1211 - 17.820 -2.810 0.0 0.1212 - 17.830 -2.837 0.0 0.1214 - 17.840 -2.839 0.0 0.1215 - 17.850 -2.819 0.0 0.1216 - 17.860 -2.781 0.0 0.1215 - 17.870 -2.730 0.0 0.1214 - 17.880 -2.668 0.0 0.1213 - 17.890 -2.599 0.0 0.1211 - 17.900 -2.522 0.0 0.1210 - 17.910 -2.438 0.0 0.1211 - 17.920 -2.346 0.0 0.1212 - 17.930 -2.244 0.0 0.1213 - 17.940 -2.130 0.0 0.1214 - 17.950 -2.001 0.0 0.1215 - 17.960 -1.855 0.0 0.1215 - 17.970 -1.690 0.0 0.1214 - 17.980 -1.505 0.0 0.1213 - 17.990 -1.302 0.0 0.1211 - 18.000 -1.080 0.0 0.1211 - 18.010 -0.845 0.0 0.1211 - 18.020 -0.598 0.0 0.1212 - 18.030 -0.344 0.0 0.1213 - 18.040 -0.090 0.0 0.1215 - 18.050 0.161 0.0 0.1215 - 18.060 0.404 0.0 0.1215 - 18.070 0.635 0.0 0.1214 - 18.080 0.849 0.0 0.1212 - 18.090 1.047 0.0 0.1211 - 18.100 1.226 0.0 0.1211 - 18.110 1.387 0.0 0.1211 - 18.120 1.532 0.0 0.1212 - 18.130 1.662 0.0 0.1214 - 18.140 1.779 0.0 0.1215 - 18.150 1.887 0.0 0.1215 - 18.160 1.987 0.0 0.1214 - 18.170 2.081 0.0 0.1213 - 18.180 2.170 0.0 0.1212 - 18.190 2.251 0.0 0.1211 - 18.200 2.325 0.0 0.1211 - 18.210 2.388 0.0 0.1212 - 18.220 2.437 0.0 0.1213 - 18.230 2.467 0.0 0.1214 - 18.240 2.475 0.0 0.1214 - 18.250 2.457 0.0 0.1215 - 18.260 2.410 0.0 0.1214 - 18.270 2.332 0.0 0.1213 - 18.280 2.224 0.0 0.1212 - 18.290 2.086 0.0 0.1211 - 18.300 1.922 0.0 0.1211 - 18.310 1.736 0.0 0.1212 - 18.320 1.534 0.0 0.1213 - 18.330 1.324 0.0 0.1214 - 18.340 1.113 0.0 0.1215 - 18.350 0.909 0.0 0.1215 - 18.360 0.719 0.0 0.1214 - 18.370 0.550 0.0 0.1213 - 18.380 0.406 0.0 0.1212 - 18.390 0.291 0.0 0.1211 - 18.400 0.207 0.0 0.1211 - 18.410 0.153 0.0 0.1212 - 18.420 0.127 0.0 0.1213 - 18.430 0.126 0.0 0.1214 - 18.440 0.145 0.0 0.1215 - 18.450 0.180 0.0 0.1215 - 18.460 0.224 0.0 0.1214 - 18.470 0.273 0.0 0.1213 - 18.480 0.323 0.0 0.1212 - 18.490 0.370 0.0 0.1212 - 18.500 0.413 0.0 0.1212 - 18.510 0.452 0.0 0.1213 - 18.520 0.486 0.0 0.1214 - 18.530 0.519 0.0 0.1215 - 18.540 0.553 0.0 0.1215 - 18.550 0.592 0.0 0.1214 - 18.560 0.640 0.0 0.1213 - 18.570 0.700 0.0 0.1212 - 18.580 0.775 0.0 0.1212 - 18.590 0.866 0.0 0.1212 - 18.600 0.973 0.0 0.1212 - 18.610 1.097 0.0 0.1213 - 18.620 1.233 0.0 0.1214 - 18.630 1.379 0.0 0.1215 - 18.640 1.530 0.0 0.1215 - 18.650 1.681 0.0 0.1215 - 18.660 1.827 0.0 0.1213 - 18.670 1.963 0.0 0.1212 - 18.680 2.085 0.0 0.1212 - 18.690 2.188 0.0 0.1212 - 18.700 2.271 0.0 0.1212 - 18.710 2.333 0.0 0.1213 - 18.720 2.374 0.0 0.1215 - 18.730 2.396 0.0 0.1215 - 18.740 2.402 0.0 0.1215 - 18.750 2.394 0.0 0.1214 - 18.760 2.376 0.0 0.1213 - 18.770 2.351 0.0 0.1212 - 18.780 2.323 0.0 0.1211 - 18.790 2.292 0.0 0.1211 - 18.800 2.261 0.0 0.1212 - 18.810 2.228 0.0 0.1214 - 18.820 2.193 0.0 0.1215 - 18.830 2.154 0.0 0.1215 - 18.840 2.106 0.0 0.1215 - 18.850 2.047 0.0 0.1214 - 18.860 1.973 0.0 0.1213 - 18.870 1.880 0.0 0.1211 - 18.880 1.767 0.0 0.1211 - 18.890 1.631 0.0 0.1211 - 18.900 1.474 0.0 0.1212 - 18.910 1.296 0.0 0.1213 - 18.920 1.100 0.0 0.1214 - 18.930 0.892 0.0 0.1215 - 18.940 0.678 0.0 0.1215 - 18.950 0.462 0.0 0.1214 - 18.960 0.254 0.0 0.1213 - 18.970 0.060 0.0 0.1212 - 18.980 -0.114 0.0 0.1211 - 18.990 -0.262 0.0 0.1212 - 19.000 -0.380 0.0 0.1213 - 19.010 -0.465 0.0 0.1214 - 19.020 -0.517 0.0 0.1215 - 19.030 -0.536 0.0 0.1215 - 19.040 -0.526 0.0 0.1214 - 19.050 -0.490 0.0 0.1213 - 19.060 -0.434 0.0 0.1212 - 19.070 -0.363 0.0 0.1211 - 19.080 -0.284 0.0 0.1211 - 19.090 -0.203 0.0 0.1211 - 19.100 -0.125 0.0 0.1212 - 19.110 -0.055 0.0 0.1214 - 19.120 0.005 0.0 0.1215 - 19.130 0.054 0.0 0.1215 - 19.140 0.090 0.0 0.1214 - 19.150 0.114 0.0 0.1213 - 19.160 0.130 0.0 0.1212 - 19.170 0.139 0.0 0.1211 - 19.180 0.146 0.0 0.1211 - 19.190 0.152 0.0 0.1212 - 19.200 0.161 0.0 0.1213 - 19.210 0.175 0.0 0.1214 - 19.220 0.195 0.0 0.1215 - 19.230 0.221 0.0 0.1215 - 19.240 0.253 0.0 0.1214 - 19.250 0.287 0.0 0.1213 - 19.260 0.321 0.0 0.1212 - 19.270 0.351 0.0 0.1211 - 19.280 0.373 0.0 0.1211 - 19.290 0.383 0.0 0.1212 - 19.300 0.377 0.0 0.1213 - 19.310 0.354 0.0 0.1214 - 19.320 0.310 0.0 0.1215 - 19.330 0.245 0.0 0.1215 - 19.340 0.160 0.0 0.1214 - 19.350 0.057 0.0 0.1213 - 19.360 -0.060 0.0 0.1212 - 19.370 -0.187 0.0 0.1211 - 19.380 -0.320 0.0 0.1211 - 19.390 -0.453 0.0 0.1212 - 19.400 -0.580 0.0 0.1213 - 19.410 -0.696 0.0 0.1214 - 19.420 -0.798 0.0 0.1215 - 19.430 -0.880 0.0 0.1215 - 19.440 -0.942 0.0 0.1214 - 19.450 -0.981 0.0 0.1213 - 19.460 -0.999 0.0 0.1211 - 19.470 -0.996 0.0 0.1211 - 19.480 -0.976 0.0 0.1211 - 19.490 -0.941 0.0 0.1212 - 19.500 -0.896 0.0 0.1213 - 19.510 -0.845 0.0 0.1214 - 19.520 -0.793 0.0 0.1215 - 19.530 -0.743 0.0 0.1215 - 19.540 -0.699 0.0 0.1214 - 19.550 -0.664 0.0 0.1213 - 19.560 -0.641 0.0 0.1212 - 19.570 -0.631 0.0 0.1211 - 19.580 -0.634 0.0 0.1211 - 19.590 -0.650 0.0 0.1212 - 19.600 -0.678 0.0 0.1214 - 19.610 -0.718 0.0 0.1215 - 19.620 -0.767 0.0 0.1215 - 19.630 -0.825 0.0 0.1215 - 19.640 -0.888 0.0 0.1214 - 19.650 -0.957 0.0 0.1213 - 19.660 -1.028 0.0 0.1212 - 19.670 -1.102 0.0 0.1211 - 19.680 -1.176 0.0 0.1212 - 19.690 -1.250 0.0 0.1213 - 19.700 -1.323 0.0 0.1214 - 19.710 -1.395 0.0 0.1215 - 19.720 -1.463 0.0 0.1215 - 19.730 -1.529 0.0 0.1215 - 19.740 -1.589 0.0 0.1214 - 19.750 -1.643 0.0 0.1213 - 19.760 -1.690 0.0 0.1212 - 19.770 -1.727 0.0 0.1212 - 19.780 -1.754 0.0 0.1212 - 19.790 -1.767 0.0 0.1213 - 19.800 -1.767 0.0 0.1214 - 19.810 -1.751 0.0 0.1215 - 19.820 -1.720 0.0 0.1215 - 19.830 -1.672 0.0 0.1215 - 19.840 -1.609 0.0 0.1213 - 19.850 -1.530 0.0 0.1212 - 19.860 -1.438 0.0 0.1211 - 19.870 -1.334 0.0 0.1211 - 19.880 -1.219 0.0 0.1212 - 19.890 -1.097 0.0 0.1213 - 19.900 -0.969 0.0 0.1214 - 19.910 -0.837 0.0 0.1215 - 19.920 -0.703 0.0 0.1215 - 19.930 -0.568 0.0 0.1214 - 19.940 -0.432 0.0 0.1213 - 19.950 -0.298 0.0 0.1212 - 19.960 -0.163 0.0 0.1211 - 19.970 -0.028 0.0 0.1211 - 19.980 0.108 0.0 0.1212 - 19.990 0.245 0.0 0.1213 - 20.000 0.384 0.0 0.1214 diff --git a/tests/testdata/Ni.dat b/tests/testdata/Ni.dat deleted file mode 100644 index 360a4d6b..00000000 --- a/tests/testdata/Ni.dat +++ /dev/null @@ -1,1001 +0,0 @@ - 1.50000 -0.539443 0.00000 1.00000 0.539443 - 1.51850 -1.03098 0.00000 1.00000 1.03098 - 1.53700 -1.43712 0.00000 1.00000 1.43712 - 1.55550 -1.73810 0.00000 1.00000 1.73810 - 1.57400 -1.93402 0.00000 1.00000 1.93402 - 1.59250 -2.04145 0.00000 1.00000 2.04145 - 1.61100 -2.08593 0.00000 1.00000 2.08593 - 1.62950 -2.09295 0.00000 1.00000 2.09295 - 1.64800 -2.08072 0.00000 1.00000 2.08072 - 1.66650 -2.05688 0.00000 1.00000 2.05688 - 1.68500 -2.02006 0.00000 1.00000 2.02006 - 1.70350 -1.96554 0.00000 1.00000 1.96554 - 1.72200 -1.89239 0.00000 1.00000 1.89239 - 1.74050 -1.80936 0.00000 1.00000 1.80936 - 1.75900 -1.73670 0.00000 1.00000 1.73670 - 1.77750 -1.70255 0.00000 1.00000 1.70255 - 1.79600 -1.73461 0.00000 1.00000 1.73461 - 1.81450 -1.84946 0.00000 1.00000 1.84946 - 1.83300 -2.04300 0.00000 1.00000 2.04300 - 1.85150 -2.28566 0.00000 1.00000 2.28566 - 1.87000 -2.52486 0.00000 1.00000 2.52486 - 1.88850 -2.69615 0.00000 1.00000 2.69615 - 1.90700 -2.74180 0.00000 1.00000 2.74180 - 1.92550 -2.63223 0.00000 1.00000 2.63223 - 1.94400 -2.38239 0.00000 1.00000 2.38239 - 1.96250 -2.05565 0.00000 1.00000 2.05565 - 1.98100 -1.75092 0.00000 1.00000 1.75092 - 1.99950 -1.57518 0.00000 1.00000 1.57518 - 2.01800 -1.60914 0.00000 1.00000 1.60914 - 2.03650 -1.87687 0.00000 1.00000 1.87687 - 2.05500 -2.33004 0.00000 1.00000 2.33004 - 2.07350 -2.85357 0.00000 1.00000 2.85357 - 2.09200 -3.29353 0.00000 1.00000 3.29353 - 2.11050 -3.50124 0.00000 1.00000 3.50124 - 2.12900 -3.38172 0.00000 1.00000 3.38172 - 2.14750 -2.93205 0.00000 1.00000 2.93205 - 2.16600 -2.25629 0.00000 1.00000 2.25629 - 2.18450 -1.54918 0.00000 1.00000 1.54918 - 2.20300 -1.04888 0.00000 1.00000 1.04888 - 2.22150 -0.968136 0.00000 1.00000 0.968136 - 2.24000 -1.42070 0.00000 1.00000 1.42070 - 2.25850 -2.36300 0.00000 1.00000 2.36300 - 2.27700 -3.56960 0.00000 1.00000 3.56960 - 2.29550 -4.65416 0.00000 1.00000 4.65416 - 2.31400 -5.13684 0.00000 1.00000 5.13684 - 2.33250 -4.54696 0.00000 1.00000 4.54696 - 2.35100 -2.53890 0.00000 1.00000 2.53890 - 2.36950 1.00656 0.00000 1.00000 -1.00656 - 2.38800 5.92223 0.00000 1.00000 -5.92223 - 2.40650 11.7527 0.00000 1.00000 -11.7527 - 2.42500 17.8143 0.00000 1.00000 -17.8143 - 2.44350 23.3057 0.00000 1.00000 -23.3057 - 2.46200 27.4478 0.00000 1.00000 -27.4478 - 2.48050 29.6246 0.00000 1.00000 -29.6246 - 2.49900 29.4986 0.00000 1.00000 -29.4986 - 2.51750 27.0749 0.00000 1.00000 -27.0749 - 2.53600 22.7028 0.00000 1.00000 -22.7028 - 2.55450 17.0112 0.00000 1.00000 -17.0112 - 2.57300 10.7932 0.00000 1.00000 -10.7932 - 2.59150 4.86134 0.00000 1.00000 -4.86134 - 2.61000 -0.0945224 0.00000 1.00000 0.0945224 - 2.62850 -3.61858 0.00000 1.00000 3.61858 - 2.64700 -5.54803 0.00000 1.00000 5.54803 - 2.66550 -6.01016 0.00000 1.00000 6.01016 - 2.68400 -5.36293 0.00000 1.00000 5.36293 - 2.70250 -4.09596 0.00000 1.00000 4.09596 - 2.72100 -2.71625 0.00000 1.00000 2.71625 - 2.73950 -1.64382 0.00000 1.00000 1.64382 - 2.75800 -1.13791 0.00000 1.00000 1.13791 - 2.77650 -1.26649 0.00000 1.00000 1.26649 - 2.79500 -1.92103 0.00000 1.00000 1.92103 - 2.81350 -2.86890 0.00000 1.00000 2.86890 - 2.83200 -3.82782 0.00000 1.00000 3.82782 - 2.85050 -4.54328 0.00000 1.00000 4.54328 - 2.86900 -4.85054 0.00000 1.00000 4.85054 - 2.88750 -4.70809 0.00000 1.00000 4.70809 - 2.90600 -4.19687 0.00000 1.00000 4.19687 - 2.92450 -3.48841 0.00000 1.00000 3.48841 - 2.94300 -2.79256 0.00000 1.00000 2.79256 - 2.96150 -2.29993 0.00000 1.00000 2.29993 - 2.98000 -2.13422 0.00000 1.00000 2.13422 - 2.99850 -2.32552 0.00000 1.00000 2.32552 - 3.01700 -2.80931 0.00000 1.00000 2.80931 - 3.03550 -3.44928 0.00000 1.00000 3.44928 - 3.05400 -4.07624 0.00000 1.00000 4.07624 - 3.07250 -4.53264 0.00000 1.00000 4.53264 - 3.09100 -4.71141 0.00000 1.00000 4.71141 - 3.10950 -4.58013 0.00000 1.00000 4.58013 - 3.12800 -4.18572 0.00000 1.00000 4.18572 - 3.14650 -3.63955 0.00000 1.00000 3.63955 - 3.16500 -3.08796 0.00000 1.00000 3.08796 - 3.18350 -2.67579 0.00000 1.00000 2.67579 - 3.20200 -2.51194 0.00000 1.00000 2.51194 - 3.22050 -2.64475 0.00000 1.00000 2.64475 - 3.23900 -3.05186 0.00000 1.00000 3.05186 - 3.25750 -3.64576 0.00000 1.00000 3.64576 - 3.27600 -4.29257 0.00000 1.00000 4.29257 - 3.29450 -4.83876 0.00000 1.00000 4.83876 - 3.31300 -5.14008 0.00000 1.00000 5.14008 - 3.33150 -5.08721 0.00000 1.00000 5.08721 - 3.35000 -4.62391 0.00000 1.00000 4.62391 - 3.36850 -3.75470 0.00000 1.00000 3.75470 - 3.38700 -2.54063 0.00000 1.00000 2.54063 - 3.40550 -1.08396 0.00000 1.00000 1.08396 - 3.42400 0.493223 0.00000 1.00000 -0.493223 - 3.44250 2.06874 0.00000 1.00000 -2.06874 - 3.46100 3.53152 0.00000 1.00000 -3.53152 - 3.47950 4.78254 0.00000 1.00000 -4.78254 - 3.49800 5.72969 0.00000 1.00000 -5.72969 - 3.51650 6.28423 0.00000 1.00000 -6.28423 - 3.53500 6.36504 0.00000 1.00000 -6.36504 - 3.55350 5.91247 0.00000 1.00000 -5.91247 - 3.57200 4.90861 0.00000 1.00000 -4.90861 - 3.59050 3.39740 0.00000 1.00000 -3.39740 - 3.60900 1.49612 0.00000 1.00000 -1.49612 - 3.62750 -0.608193 0.00000 1.00000 0.608193 - 3.64600 -2.68019 0.00000 1.00000 2.68019 - 3.66450 -4.47243 0.00000 1.00000 4.47243 - 3.68300 -5.76925 0.00000 1.00000 5.76925 - 3.70150 -6.42920 0.00000 1.00000 6.42920 - 3.72000 -6.41719 0.00000 1.00000 6.41719 - 3.73850 -5.81875 0.00000 1.00000 5.81875 - 3.75700 -4.83074 0.00000 1.00000 4.83074 - 3.77550 -3.72667 0.00000 1.00000 3.72667 - 3.79400 -2.80071 0.00000 1.00000 2.80071 - 3.81250 -2.30147 0.00000 1.00000 2.30147 - 3.83100 -2.37126 0.00000 1.00000 2.37126 - 3.84950 -3.00713 0.00000 1.00000 3.00713 - 3.86800 -4.05566 0.00000 1.00000 4.05566 - 3.88650 -5.24604 0.00000 1.00000 5.24604 - 3.90500 -6.25585 0.00000 1.00000 6.25585 - 3.92350 -6.79521 0.00000 1.00000 6.79521 - 3.94200 -6.68830 0.00000 1.00000 6.68830 - 3.96050 -5.93010 0.00000 1.00000 5.93010 - 3.97900 -4.70113 0.00000 1.00000 4.70113 - 3.99750 -3.33259 0.00000 1.00000 3.33259 - 4.01600 -2.22683 0.00000 1.00000 2.22683 - 4.03450 -1.75037 0.00000 1.00000 1.75037 - 4.05300 -2.12498 0.00000 1.00000 2.12498 - 4.07150 -3.34471 0.00000 1.00000 3.34471 - 4.09000 -5.14253 0.00000 1.00000 5.14253 - 4.10850 -7.01935 0.00000 1.00000 7.01935 - 4.12700 -8.33391 0.00000 1.00000 8.33391 - 4.14550 -8.43660 0.00000 1.00000 8.43660 - 4.16400 -6.81920 0.00000 1.00000 6.81920 - 4.18250 -3.24667 0.00000 1.00000 3.24667 - 4.20100 2.16009 0.00000 1.00000 -2.16009 - 4.21950 8.91152 0.00000 1.00000 -8.91152 - 4.23800 16.2134 0.00000 1.00000 -16.2134 - 4.25650 23.0973 0.00000 1.00000 -23.0973 - 4.27500 28.5935 0.00000 1.00000 -28.5935 - 4.29350 31.9106 0.00000 1.00000 -31.9106 - 4.31200 32.5842 0.00000 1.00000 -32.5842 - 4.33050 30.5617 0.00000 1.00000 -30.5617 - 4.34900 26.2027 0.00000 1.00000 -26.2027 - 4.36750 20.1990 0.00000 1.00000 -20.1990 - 4.38600 13.4320 0.00000 1.00000 -13.4320 - 4.40450 6.80337 0.00000 1.00000 -6.80337 - 4.42300 1.07527 0.00000 1.00000 -1.07527 - 4.44150 -3.24700 0.00000 1.00000 3.24700 - 4.46000 -5.96945 0.00000 1.00000 5.96945 - 4.47850 -7.19581 0.00000 1.00000 7.19581 - 4.49700 -7.25613 0.00000 1.00000 7.25613 - 4.51550 -6.59972 0.00000 1.00000 6.59972 - 4.53400 -5.68054 0.00000 1.00000 5.68054 - 4.55250 -4.86170 0.00000 1.00000 4.86170 - 4.57100 -4.35835 0.00000 1.00000 4.35835 - 4.58950 -4.22677 0.00000 1.00000 4.22677 - 4.60800 -4.39508 0.00000 1.00000 4.39508 - 4.62650 -4.72130 0.00000 1.00000 4.72130 - 4.64500 -5.05871 0.00000 1.00000 5.05871 - 4.66350 -5.30848 0.00000 1.00000 5.30848 - 4.68200 -5.44197 0.00000 1.00000 5.44197 - 4.70050 -5.50097 0.00000 1.00000 5.50097 - 4.71900 -5.56456 0.00000 1.00000 5.56456 - 4.73750 -5.69659 0.00000 1.00000 5.69659 - 4.75600 -5.90806 0.00000 1.00000 5.90806 - 4.77450 -6.13525 0.00000 1.00000 6.13525 - 4.79300 -6.24364 0.00000 1.00000 6.24364 - 4.81150 -6.05670 0.00000 1.00000 6.05670 - 4.83000 -5.40165 0.00000 1.00000 5.40165 - 4.84850 -4.16022 0.00000 1.00000 4.16022 - 4.86700 -2.31100 0.00000 1.00000 2.31100 - 4.88550 0.0479985 0.00000 1.00000 -0.0479985 - 4.90400 2.70271 0.00000 1.00000 -2.70271 - 4.92250 5.35252 0.00000 1.00000 -5.35252 - 4.94100 7.65960 0.00000 1.00000 -7.65960 - 4.95950 9.30734 0.00000 1.00000 -9.30734 - 4.97800 10.0558 0.00000 1.00000 -10.0558 - 4.99650 9.78268 0.00000 1.00000 -9.78268 - 5.01500 8.50309 0.00000 1.00000 -8.50309 - 5.03350 6.36470 0.00000 1.00000 -6.36470 - 5.05200 3.62252 0.00000 1.00000 -3.62252 - 5.07050 0.599290 0.00000 1.00000 -0.599290 - 5.08900 -2.36086 0.00000 1.00000 2.36086 - 5.10750 -4.93870 0.00000 1.00000 4.93870 - 5.12600 -6.88149 0.00000 1.00000 6.88149 - 5.14450 -8.03565 0.00000 1.00000 8.03565 - 5.16300 -8.36668 0.00000 1.00000 8.36668 - 5.18150 -7.96304 0.00000 1.00000 7.96304 - 5.20000 -7.02207 0.00000 1.00000 7.02207 - 5.21850 -5.81895 0.00000 1.00000 5.81895 - 5.23700 -4.66171 0.00000 1.00000 4.66171 - 5.25550 -3.83844 0.00000 1.00000 3.83844 - 5.27400 -3.56410 0.00000 1.00000 3.56410 - 5.29250 -3.93573 0.00000 1.00000 3.93573 - 5.31100 -4.90467 0.00000 1.00000 4.90467 - 5.32950 -6.27267 0.00000 1.00000 6.27267 - 5.34800 -7.71536 0.00000 1.00000 7.71536 - 5.36650 -8.83203 0.00000 1.00000 8.83203 - 5.38500 -9.21516 0.00000 1.00000 9.21516 - 5.40350 -8.52808 0.00000 1.00000 8.52808 - 5.42200 -6.57611 0.00000 1.00000 6.57611 - 5.44050 -3.35625 0.00000 1.00000 3.35625 - 5.45900 0.925287 0.00000 1.00000 -0.925287 - 5.47750 5.87209 0.00000 1.00000 -5.87209 - 5.49600 10.9500 0.00000 1.00000 -10.9500 - 5.51450 15.5640 0.00000 1.00000 -15.5640 - 5.53300 19.1477 0.00000 1.00000 -19.1477 - 5.55150 21.2490 0.00000 1.00000 -21.2490 - 5.57000 21.6003 0.00000 1.00000 -21.6003 - 5.58850 20.1588 0.00000 1.00000 -20.1588 - 5.60700 17.1124 0.00000 1.00000 -17.1124 - 5.62550 12.8494 0.00000 1.00000 -12.8494 - 5.64400 7.89927 0.00000 1.00000 -7.89927 - 5.66250 2.85190 0.00000 1.00000 -2.85190 - 5.68100 -1.72997 0.00000 1.00000 1.72997 - 5.69950 -5.39381 0.00000 1.00000 5.39381 - 5.71800 -7.86162 0.00000 1.00000 7.86162 - 5.73650 -9.06420 0.00000 1.00000 9.06420 - 5.75500 -9.13837 0.00000 1.00000 9.13837 - 5.77350 -8.38683 0.00000 1.00000 8.38683 - 5.79200 -7.20818 0.00000 1.00000 7.20818 - 5.81050 -6.01172 0.00000 1.00000 6.01172 - 5.82900 -5.13567 0.00000 1.00000 5.13567 - 5.84750 -4.78662 0.00000 1.00000 4.78662 - 5.86600 -5.01125 0.00000 1.00000 5.01125 - 5.88450 -5.70222 0.00000 1.00000 5.70222 - 5.90300 -6.63275 0.00000 1.00000 6.63275 - 5.92150 -7.51031 0.00000 1.00000 7.51031 - 5.94000 -8.03914 0.00000 1.00000 8.03914 - 5.95850 -7.98163 0.00000 1.00000 7.98163 - 5.97700 -7.20897 0.00000 1.00000 7.20897 - 5.99550 -5.73309 0.00000 1.00000 5.73309 - 6.01400 -3.71335 0.00000 1.00000 3.71335 - 6.03250 -1.43572 0.00000 1.00000 1.43572 - 6.05100 0.734316 0.00000 1.00000 -0.734316 - 6.06950 2.41816 0.00000 1.00000 -2.41816 - 6.08800 3.29880 0.00000 1.00000 -3.29880 - 6.10650 3.18922 0.00000 1.00000 -3.18922 - 6.12500 2.07961 0.00000 1.00000 -2.07961 - 6.14350 0.150522 0.00000 1.00000 -0.150522 - 6.16200 -2.25436 0.00000 1.00000 2.25436 - 6.18050 -4.69426 0.00000 1.00000 4.69426 - 6.19900 -6.72460 0.00000 1.00000 6.72460 - 6.21750 -7.99834 0.00000 1.00000 7.99834 - 6.23600 -8.35142 0.00000 1.00000 8.35142 - 6.25450 -7.84948 0.00000 1.00000 7.84948 - 6.27300 -6.78013 0.00000 1.00000 6.78013 - 6.29150 -5.58671 0.00000 1.00000 5.58671 - 6.31000 -4.75441 0.00000 1.00000 4.75441 - 6.32850 -4.67266 0.00000 1.00000 4.67266 - 6.34700 -5.50714 0.00000 1.00000 5.50714 - 6.36550 -7.11590 0.00000 1.00000 7.11590 - 6.38400 -9.03699 0.00000 1.00000 9.03699 - 6.40250 -10.5592 0.00000 1.00000 10.5592 - 6.42100 -10.8676 0.00000 1.00000 10.8676 - 6.43950 -9.23379 0.00000 1.00000 9.23379 - 6.45800 -5.20861 0.00000 1.00000 5.20861 - 6.47650 1.23011 0.00000 1.00000 -1.23011 - 6.49500 9.61241 0.00000 1.00000 -9.61241 - 6.51350 19.0142 0.00000 1.00000 -19.0142 - 6.53200 28.1967 0.00000 1.00000 -28.1967 - 6.55050 35.8243 0.00000 1.00000 -35.8243 - 6.56900 40.7166 0.00000 1.00000 -40.7166 - 6.58750 42.0833 0.00000 1.00000 -42.0833 - 6.60600 39.6873 0.00000 1.00000 -39.6873 - 6.62450 33.8989 0.00000 1.00000 -33.8989 - 6.64300 25.6256 0.00000 1.00000 -25.6256 - 6.66150 16.1324 0.00000 1.00000 -16.1324 - 6.68000 6.79125 0.00000 1.00000 -6.79125 - 6.69850 -1.18411 0.00000 1.00000 1.18411 - 6.71700 -6.95910 0.00000 1.00000 6.95910 - 6.73550 -10.2079 0.00000 1.00000 10.2079 - 6.75400 -11.1248 0.00000 1.00000 11.1248 - 6.77250 -10.3198 0.00000 1.00000 10.3198 - 6.79100 -8.62815 0.00000 1.00000 8.62815 - 6.80950 -6.88571 0.00000 1.00000 6.88571 - 6.82800 -5.72660 0.00000 1.00000 5.72660 - 6.84650 -5.45332 0.00000 1.00000 5.45332 - 6.86500 -6.00649 0.00000 1.00000 6.00649 - 6.88350 -7.03437 0.00000 1.00000 7.03437 - 6.90200 -8.03570 0.00000 1.00000 8.03570 - 6.92050 -8.53209 0.00000 1.00000 8.53209 - 6.93900 -8.22002 0.00000 1.00000 8.22002 - 6.95750 -7.06140 0.00000 1.00000 7.06140 - 6.97600 -5.29017 0.00000 1.00000 5.29017 - 6.99450 -3.33754 0.00000 1.00000 3.33754 - 7.01300 -1.70148 0.00000 1.00000 1.70148 - 7.03150 -0.800760 0.00000 1.00000 0.800760 - 7.05000 -0.856664 0.00000 1.00000 0.856664 - 7.06850 -1.83505 0.00000 1.00000 1.83505 - 7.08700 -3.46358 0.00000 1.00000 3.46358 - 7.10550 -5.31731 0.00000 1.00000 5.31731 - 7.12400 -6.94715 0.00000 1.00000 6.94715 - 7.14250 -8.01332 0.00000 1.00000 8.01332 - 7.16100 -8.38320 0.00000 1.00000 8.38320 - 7.17950 -8.16268 0.00000 1.00000 8.16268 - 7.19800 -7.64952 0.00000 1.00000 7.64952 - 7.21650 -7.22129 0.00000 1.00000 7.22129 - 7.23500 -7.19206 0.00000 1.00000 7.19206 - 7.25350 -7.68220 0.00000 1.00000 7.68220 - 7.27200 -8.54371 0.00000 1.00000 8.54371 - 7.29050 -9.36819 0.00000 1.00000 9.36819 - 7.30900 -9.58072 0.00000 1.00000 9.58072 - 7.32750 -8.59790 0.00000 1.00000 8.59790 - 7.34600 -6.00785 0.00000 1.00000 6.00785 - 7.36450 -1.72106 0.00000 1.00000 1.72106 - 7.38300 3.95269 0.00000 1.00000 -3.95269 - 7.40150 10.3276 0.00000 1.00000 -10.3276 - 7.42000 16.4640 0.00000 1.00000 -16.4640 - 7.43850 21.3618 0.00000 1.00000 -21.3618 - 7.45700 24.1782 0.00000 1.00000 -24.1782 - 7.47550 24.4162 0.00000 1.00000 -24.4162 - 7.49400 22.0356 0.00000 1.00000 -22.0356 - 7.51250 17.4573 0.00000 1.00000 -17.4573 - 7.53100 11.4623 0.00000 1.00000 -11.4623 - 7.54950 5.01118 0.00000 1.00000 -5.01118 - 7.56800 -0.965076 0.00000 1.00000 0.965076 - 7.58650 -5.75153 0.00000 1.00000 5.75153 - 7.60500 -8.96799 0.00000 1.00000 8.96799 - 7.62350 -10.5969 0.00000 1.00000 10.5969 - 7.64200 -10.9206 0.00000 1.00000 10.9206 - 7.66050 -10.3893 0.00000 1.00000 10.3893 - 7.67900 -9.46200 0.00000 1.00000 9.46200 - 7.69750 -8.46444 0.00000 1.00000 8.46444 - 7.71600 -7.50854 0.00000 1.00000 7.50854 - 7.73450 -6.49304 0.00000 1.00000 6.49304 - 7.75300 -5.18168 0.00000 1.00000 5.18168 - 7.77150 -3.32911 0.00000 1.00000 3.32911 - 7.79000 -0.811546 0.00000 1.00000 0.811546 - 7.80850 2.28073 0.00000 1.00000 -2.28073 - 7.82700 5.61902 0.00000 1.00000 -5.61902 - 7.84550 8.68909 0.00000 1.00000 -8.68909 - 7.86400 10.9073 0.00000 1.00000 -10.9073 - 7.88250 11.7676 0.00000 1.00000 -11.7676 - 7.90100 10.9777 0.00000 1.00000 -10.9777 - 7.91950 8.54633 0.00000 1.00000 -8.54633 - 7.93800 4.79627 0.00000 1.00000 -4.79627 - 7.95650 0.300695 0.00000 1.00000 -0.300695 - 7.97500 -4.24152 0.00000 1.00000 4.24152 - 7.99350 -8.15787 0.00000 1.00000 8.15787 - 8.01200 -10.9420 0.00000 1.00000 10.9420 - 8.03050 -12.3456 0.00000 1.00000 12.3456 - 8.04900 -12.4001 0.00000 1.00000 12.4001 - 8.06750 -11.3663 0.00000 1.00000 11.3663 - 8.08600 -9.63181 0.00000 1.00000 9.63181 - 8.10450 -7.58723 0.00000 1.00000 7.58723 - 8.12300 -5.52117 0.00000 1.00000 5.52117 - 8.14150 -3.56353 0.00000 1.00000 3.56353 - 8.16000 -1.69260 0.00000 1.00000 1.69260 - 8.17850 0.199827 0.00000 1.00000 -0.199827 - 8.19700 2.21044 0.00000 1.00000 -2.21044 - 8.21550 4.33057 0.00000 1.00000 -4.33057 - 8.23400 6.39218 0.00000 1.00000 -6.39218 - 8.25250 8.07555 0.00000 1.00000 -8.07555 - 8.27100 8.97896 0.00000 1.00000 -8.97896 - 8.28950 8.73073 0.00000 1.00000 -8.73073 - 8.30800 7.11016 0.00000 1.00000 -7.11016 - 8.32650 4.14151 0.00000 1.00000 -4.14151 - 8.34500 0.130936 0.00000 1.00000 -0.130936 - 8.36350 -4.36837 0.00000 1.00000 4.36837 - 8.38200 -8.65854 0.00000 1.00000 8.65854 - 8.40050 -12.0433 0.00000 1.00000 12.0433 - 8.41900 -13.9807 0.00000 1.00000 13.9807 - 8.43750 -14.2030 0.00000 1.00000 14.2030 - 8.45600 -12.7704 0.00000 1.00000 12.7704 - 8.47450 -10.0445 0.00000 1.00000 10.0445 - 8.49300 -6.58938 0.00000 1.00000 6.58938 - 8.51150 -3.02663 0.00000 1.00000 3.02663 - 8.53000 0.112114 0.00000 1.00000 -0.112114 - 8.54850 2.49566 0.00000 1.00000 -2.49566 - 8.56700 4.03580 0.00000 1.00000 -4.03580 - 8.58550 4.85377 0.00000 1.00000 -4.85377 - 8.60400 5.18537 0.00000 1.00000 -5.18537 - 8.62250 5.25808 0.00000 1.00000 -5.25808 - 8.64100 5.18193 0.00000 1.00000 -5.18193 - 8.65950 4.89182 0.00000 1.00000 -4.89182 - 8.67800 4.16349 0.00000 1.00000 -4.16349 - 8.69650 2.70252 0.00000 1.00000 -2.70252 - 8.71500 0.282220 0.00000 1.00000 -0.282220 - 8.73350 -3.11124 0.00000 1.00000 3.11124 - 8.75200 -7.17490 0.00000 1.00000 7.17490 - 8.77050 -11.2672 0.00000 1.00000 11.2672 - 8.78900 -14.4886 0.00000 1.00000 14.4886 - 8.80750 -15.8559 0.00000 1.00000 15.8559 - 8.82600 -14.5328 0.00000 1.00000 14.5328 - 8.84450 -10.0609 0.00000 1.00000 10.0609 - 8.86300 -2.52773 0.00000 1.00000 2.52773 - 8.88150 7.37428 0.00000 1.00000 -7.37428 - 8.90000 18.4240 0.00000 1.00000 -18.4240 - 8.91850 29.0726 0.00000 1.00000 -29.0726 - 8.93700 37.7295 0.00000 1.00000 -37.7295 - 8.95550 43.0717 0.00000 1.00000 -43.0717 - 8.97400 44.3044 0.00000 1.00000 -44.3044 - 8.99250 41.3154 0.00000 1.00000 -41.3154 - 9.01100 34.6857 0.00000 1.00000 -34.6857 - 9.02950 25.5570 0.00000 1.00000 -25.5570 - 9.04800 15.3859 0.00000 1.00000 -15.3859 - 9.06650 5.64529 0.00000 1.00000 -5.64529 - 9.08500 -2.45985 0.00000 1.00000 2.45985 - 9.10350 -8.19758 0.00000 1.00000 8.19758 - 9.12200 -11.3936 0.00000 1.00000 11.3936 - 9.14050 -12.3840 0.00000 1.00000 12.3840 - 9.15900 -11.8591 0.00000 1.00000 11.8591 - 9.17750 -10.6446 0.00000 1.00000 10.6446 - 9.19600 -9.48212 0.00000 1.00000 9.48212 - 9.21450 -8.86286 0.00000 1.00000 8.86286 - 9.23300 -8.95166 0.00000 1.00000 8.95166 - 9.25150 -9.60978 0.00000 1.00000 9.60978 - 9.27000 -10.4985 0.00000 1.00000 10.4985 - 9.28850 -11.2264 0.00000 1.00000 11.2264 - 9.30700 -11.4956 0.00000 1.00000 11.4956 - 9.32550 -11.2056 0.00000 1.00000 11.2056 - 9.34400 -10.4851 0.00000 1.00000 10.4851 - 9.36250 -9.64367 0.00000 1.00000 9.64367 - 9.38100 -9.05839 0.00000 1.00000 9.05839 - 9.39950 -9.03059 0.00000 1.00000 9.03059 - 9.41800 -9.65891 0.00000 1.00000 9.65891 - 9.43650 -10.7695 0.00000 1.00000 10.7695 - 9.45500 -11.9282 0.00000 1.00000 11.9282 - 9.47350 -12.5352 0.00000 1.00000 12.5352 - 9.49200 -11.9793 0.00000 1.00000 11.9793 - 9.51050 -9.80968 0.00000 1.00000 9.80968 - 9.52900 -5.88098 0.00000 1.00000 5.88098 - 9.54750 -0.429865 0.00000 1.00000 0.429865 - 9.56600 5.93738 0.00000 1.00000 -5.93738 - 9.58450 12.3467 0.00000 1.00000 -12.3467 - 9.60300 17.8253 0.00000 1.00000 -17.8253 - 9.62150 21.4983 0.00000 1.00000 -21.4983 - 9.64000 22.7684 0.00000 1.00000 -22.7684 - 9.65850 21.4353 0.00000 1.00000 -21.4353 - 9.67700 17.7297 0.00000 1.00000 -17.7297 - 9.69550 12.2556 0.00000 1.00000 -12.2556 - 9.71400 5.85940 0.00000 1.00000 -5.85940 - 9.73250 -0.539853 0.00000 1.00000 0.539853 - 9.75100 -6.11696 0.00000 1.00000 6.11696 - 9.76950 -10.2704 0.00000 1.00000 10.2704 - 9.78800 -12.6954 0.00000 1.00000 12.6954 - 9.80650 -13.3941 0.00000 1.00000 13.3941 - 9.82500 -12.6315 0.00000 1.00000 12.6315 - 9.84350 -10.8487 0.00000 1.00000 10.8487 - 9.86200 -8.55755 0.00000 1.00000 8.55755 - 9.88050 -6.24003 0.00000 1.00000 6.24003 - 9.89900 -4.27478 0.00000 1.00000 4.27478 - 9.91750 -2.90328 0.00000 1.00000 2.90328 - 9.93600 -2.23386 0.00000 1.00000 2.23386 - 9.95450 -2.27104 0.00000 1.00000 2.27104 - 9.97300 -2.95175 0.00000 1.00000 2.95175 - 9.99150 -4.17209 0.00000 1.00000 4.17209 - 10.0100 -5.79607 0.00000 1.00000 5.79607 - 10.0285 -7.64859 0.00000 1.00000 7.64859 - 10.0470 -9.50283 0.00000 1.00000 9.50283 - 10.0655 -11.0757 0.00000 1.00000 11.0757 - 10.0840 -12.0425 0.00000 1.00000 12.0425 - 10.1025 -12.0751 0.00000 1.00000 12.0751 - 10.1210 -10.9017 0.00000 1.00000 10.9017 - 10.1395 -8.37613 0.00000 1.00000 8.37613 - 10.1580 -4.54026 0.00000 1.00000 4.54026 - 10.1765 0.338357 0.00000 1.00000 -0.338357 - 10.1950 5.76996 0.00000 1.00000 -5.76996 - 10.2135 11.0939 0.00000 1.00000 -11.0939 - 10.2320 15.5741 0.00000 1.00000 -15.5741 - 10.2505 18.5225 0.00000 1.00000 -18.5225 - 10.2690 19.4270 0.00000 1.00000 -19.4270 - 10.2875 18.0567 0.00000 1.00000 -18.0567 - 10.3060 14.5227 0.00000 1.00000 -14.5227 - 10.3245 9.27796 0.00000 1.00000 -9.27796 - 10.3430 3.05599 0.00000 1.00000 -3.05599 - 10.3615 -3.24345 0.00000 1.00000 3.24345 - 10.3800 -8.70145 0.00000 1.00000 8.70145 - 10.3985 -12.5330 0.00000 1.00000 12.5330 - 10.4170 -14.2182 0.00000 1.00000 14.2182 - 10.4355 -13.5885 0.00000 1.00000 13.5885 - 10.4540 -10.8525 0.00000 1.00000 10.8525 - 10.4725 -6.55772 0.00000 1.00000 6.55772 - 10.4910 -1.49640 0.00000 1.00000 1.49640 - 10.5095 3.42852 0.00000 1.00000 -3.42852 - 10.5280 7.35363 0.00000 1.00000 -7.35363 - 10.5465 9.59717 0.00000 1.00000 -9.59717 - 10.5650 9.77054 0.00000 1.00000 -9.77054 - 10.5835 7.84234 0.00000 1.00000 -7.84234 - 10.6020 4.14584 0.00000 1.00000 -4.14584 - 10.6205 -0.671143 0.00000 1.00000 0.671143 - 10.6390 -5.74603 0.00000 1.00000 5.74603 - 10.6575 -10.1361 0.00000 1.00000 10.1361 - 10.6760 -12.9671 0.00000 1.00000 12.9671 - 10.6945 -13.5738 0.00000 1.00000 13.5738 - 10.7130 -11.6108 0.00000 1.00000 11.6108 - 10.7315 -7.11852 0.00000 1.00000 7.11852 - 10.7500 -0.532582 0.00000 1.00000 0.532582 - 10.7685 7.36496 0.00000 1.00000 -7.36496 - 10.7870 15.5502 0.00000 1.00000 -15.5502 - 10.8055 22.9046 0.00000 1.00000 -22.9046 - 10.8240 28.3836 0.00000 1.00000 -28.3836 - 10.8425 31.1819 0.00000 1.00000 -31.1819 - 10.8610 30.8667 0.00000 1.00000 -30.8667 - 10.8795 27.4544 0.00000 1.00000 -27.4544 - 10.8980 21.4174 0.00000 1.00000 -21.4174 - 10.9165 13.6149 0.00000 1.00000 -13.6149 - 10.9350 5.15717 0.00000 1.00000 -5.15717 - 10.9535 -2.77403 0.00000 1.00000 2.77403 - 10.9720 -9.11963 0.00000 1.00000 9.11963 - 10.9905 -13.1166 0.00000 1.00000 13.1166 - 11.0090 -14.4189 0.00000 1.00000 14.4189 - 11.0275 -13.1446 0.00000 1.00000 13.1446 - 11.0460 -9.84069 0.00000 1.00000 9.84069 - 11.0645 -5.37361 0.00000 1.00000 5.37361 - 11.0830 -0.766336 0.00000 1.00000 0.766336 - 11.1015 2.99059 0.00000 1.00000 -2.99059 - 11.1200 5.12102 0.00000 1.00000 -5.12102 - 11.1385 5.20555 0.00000 1.00000 -5.20555 - 11.1570 3.25580 0.00000 1.00000 -3.25580 - 11.1755 -0.295787 0.00000 1.00000 0.295787 - 11.1940 -4.68917 0.00000 1.00000 4.68917 - 11.2125 -8.99252 0.00000 1.00000 8.99252 - 11.2310 -12.2872 0.00000 1.00000 12.2872 - 11.2495 -13.8447 0.00000 1.00000 13.8447 - 11.2680 -13.2610 0.00000 1.00000 13.2610 - 11.2865 -10.5280 0.00000 1.00000 10.5280 - 11.3050 -6.02790 0.00000 1.00000 6.02790 - 11.3235 -0.457428 0.00000 1.00000 0.457428 - 11.3420 5.30272 0.00000 1.00000 -5.30272 - 11.3605 10.3468 0.00000 1.00000 -10.3468 - 11.3790 13.9003 0.00000 1.00000 -13.9003 - 11.3975 15.4459 0.00000 1.00000 -15.4459 - 11.4160 14.7993 0.00000 1.00000 -14.7993 - 11.4345 12.1251 0.00000 1.00000 -12.1251 - 11.4530 7.89515 0.00000 1.00000 -7.89515 - 11.4715 2.79743 0.00000 1.00000 -2.79743 - 11.4900 -2.38402 0.00000 1.00000 2.38402 - 11.5085 -6.89848 0.00000 1.00000 6.89848 - 11.5270 -10.1446 0.00000 1.00000 10.1446 - 11.5455 -11.7562 0.00000 1.00000 11.7562 - 11.5640 -11.6477 0.00000 1.00000 11.6477 - 11.5825 -10.0156 0.00000 1.00000 10.0156 - 11.6010 -7.29778 0.00000 1.00000 7.29778 - 11.6195 -4.09885 0.00000 1.00000 4.09885 - 11.6380 -1.08810 0.00000 1.00000 1.08810 - 11.6565 1.11439 0.00000 1.00000 -1.11439 - 11.6750 2.04788 0.00000 1.00000 -2.04788 - 11.6935 1.49867 0.00000 1.00000 -1.49867 - 11.7120 -0.451611 0.00000 1.00000 0.451611 - 11.7305 -3.42848 0.00000 1.00000 3.42848 - 11.7490 -6.82125 0.00000 1.00000 6.82125 - 11.7675 -9.88740 0.00000 1.00000 9.88740 - 11.7860 -11.8896 0.00000 1.00000 11.8896 - 11.8045 -12.2430 0.00000 1.00000 12.2430 - 11.8230 -10.6446 0.00000 1.00000 10.6446 - 11.8415 -7.15722 0.00000 1.00000 7.15722 - 11.8600 -2.22583 0.00000 1.00000 2.22583 - 11.8785 3.38458 0.00000 1.00000 -3.38458 - 11.8970 8.72108 0.00000 1.00000 -8.72108 - 11.9155 12.8213 0.00000 1.00000 -12.8213 - 11.9340 14.9032 0.00000 1.00000 -14.9032 - 11.9525 14.5281 0.00000 1.00000 -14.5281 - 11.9710 11.6999 0.00000 1.00000 -11.6999 - 11.9895 6.87776 0.00000 1.00000 -6.87776 - 12.0080 0.891504 0.00000 1.00000 -0.891504 - 12.0265 -5.22565 0.00000 1.00000 5.22565 - 12.0450 -10.4522 0.00000 1.00000 10.4522 - 12.0635 -13.9931 0.00000 1.00000 13.9931 - 12.0820 -15.4435 0.00000 1.00000 15.4435 - 12.1005 -14.8644 0.00000 1.00000 14.8644 - 12.1190 -12.7520 0.00000 1.00000 12.7520 - 12.1375 -9.90845 0.00000 1.00000 9.90845 - 12.1560 -7.24453 0.00000 1.00000 7.24453 - 12.1745 -5.56166 0.00000 1.00000 5.56166 - 12.1930 -5.36161 0.00000 1.00000 5.36161 - 12.2115 -6.72586 0.00000 1.00000 6.72586 - 12.2300 -9.28835 0.00000 1.00000 9.28835 - 12.2485 -12.3067 0.00000 1.00000 12.3067 - 12.2670 -14.8178 0.00000 1.00000 14.8178 - 12.2855 -15.8476 0.00000 1.00000 15.8476 - 12.3040 -14.6332 0.00000 1.00000 14.6332 - 12.3225 -10.8097 0.00000 1.00000 10.8097 - 12.3410 -4.52145 0.00000 1.00000 4.52145 - 12.3595 3.57058 0.00000 1.00000 -3.57058 - 12.3780 12.3893 0.00000 1.00000 -12.3893 - 12.3965 20.6314 0.00000 1.00000 -20.6314 - 12.4150 27.0092 0.00000 1.00000 -27.0092 - 12.4335 30.4959 0.00000 1.00000 -30.4959 - 12.4520 30.5247 0.00000 1.00000 -30.5247 - 12.4705 27.1034 0.00000 1.00000 -27.1034 - 12.4890 20.8197 0.00000 1.00000 -20.8197 - 12.5075 12.7348 0.00000 1.00000 -12.7348 - 12.5260 4.18409 0.00000 1.00000 -4.18409 - 12.5445 -3.47600 0.00000 1.00000 3.47600 - 12.5630 -9.12640 0.00000 1.00000 9.12640 - 12.5815 -12.0958 0.00000 1.00000 12.0958 - 12.6000 -12.2803 0.00000 1.00000 12.2803 - 12.6185 -10.1467 0.00000 1.00000 10.1467 - 12.6370 -6.61573 0.00000 1.00000 6.61573 - 12.6555 -2.84816 0.00000 1.00000 2.84816 - 12.6740 0.0234471 0.00000 1.00000 -0.0234471 - 12.6925 1.16051 0.00000 1.00000 -1.16051 - 12.7110 0.222329 0.00000 1.00000 -0.222329 - 12.7295 -2.53923 0.00000 1.00000 2.53923 - 12.7480 -6.31966 0.00000 1.00000 6.31966 - 12.7665 -9.93250 0.00000 1.00000 9.93250 - 12.7850 -12.0782 0.00000 1.00000 12.0782 - 12.8035 -11.6556 0.00000 1.00000 11.6556 - 12.8220 -8.04822 0.00000 1.00000 8.04822 - 12.8405 -1.31753 0.00000 1.00000 1.31753 - 12.8590 7.74657 0.00000 1.00000 -7.74657 - 12.8775 17.7420 0.00000 1.00000 -17.7420 - 12.8960 26.9214 0.00000 1.00000 -26.9214 - 12.9145 33.5578 0.00000 1.00000 -33.5578 - 12.9330 36.3277 0.00000 1.00000 -36.3277 - 12.9515 34.6234 0.00000 1.00000 -34.6234 - 12.9700 28.7156 0.00000 1.00000 -28.7156 - 12.9885 19.7233 0.00000 1.00000 -19.7233 - 13.0070 9.38804 0.00000 1.00000 -9.38804 - 13.0255 -0.297908 0.00000 1.00000 0.297908 - 13.0440 -7.52791 0.00000 1.00000 7.52791 - 13.0625 -11.0794 0.00000 1.00000 11.0794 - 13.0810 -10.5807 0.00000 1.00000 10.5807 - 13.0995 -6.58087 0.00000 1.00000 6.58087 - 13.1180 -0.404585 0.00000 1.00000 0.404585 - 13.1365 6.17556 0.00000 1.00000 -6.17556 - 13.1550 11.3708 0.00000 1.00000 -11.3708 - 13.1735 13.8053 0.00000 1.00000 -13.8053 - 13.1920 12.8357 0.00000 1.00000 -12.8357 - 13.2105 8.68336 0.00000 1.00000 -8.68336 - 13.2290 2.34908 0.00000 1.00000 -2.34908 - 13.2475 -4.66287 0.00000 1.00000 4.66287 - 13.2660 -10.7379 0.00000 1.00000 10.7379 - 13.2845 -14.5602 0.00000 1.00000 14.5602 - 13.3030 -15.4343 0.00000 1.00000 15.4343 - 13.3215 -13.4393 0.00000 1.00000 13.4393 - 13.3400 -9.37967 0.00000 1.00000 9.37967 - 13.3585 -4.55053 0.00000 1.00000 4.55053 - 13.3770 -0.382431 0.00000 1.00000 0.382431 - 13.3955 1.93839 0.00000 1.00000 -1.93839 - 13.4140 1.77366 0.00000 1.00000 -1.77366 - 13.4325 -0.818874 0.00000 1.00000 0.818874 - 13.4510 -5.13072 0.00000 1.00000 5.13072 - 13.4695 -10.0255 0.00000 1.00000 10.0255 - 13.4880 -14.2744 0.00000 1.00000 14.2744 - 13.5065 -16.9060 0.00000 1.00000 16.9060 - 13.5250 -17.4714 0.00000 1.00000 17.4714 - 13.5435 -16.1512 0.00000 1.00000 16.1512 - 13.5620 -13.6784 0.00000 1.00000 13.6784 - 13.5805 -11.1043 0.00000 1.00000 11.1043 - 13.5990 -9.47288 0.00000 1.00000 9.47288 - 13.6175 -9.49567 0.00000 1.00000 9.49567 - 13.6360 -11.3153 0.00000 1.00000 11.3153 - 13.6545 -14.4268 0.00000 1.00000 14.4268 - 13.6730 -17.7824 0.00000 1.00000 17.7824 - 13.6915 -20.0552 0.00000 1.00000 20.0552 - 13.7100 -19.9965 0.00000 1.00000 19.9965 - 13.7285 -16.7898 0.00000 1.00000 16.7898 - 13.7470 -10.3089 0.00000 1.00000 10.3089 - 13.7655 -1.20781 0.00000 1.00000 1.20781 - 13.7840 9.18567 0.00000 1.00000 -9.18567 - 13.8025 19.1488 0.00000 1.00000 -19.1488 - 13.8210 26.9489 0.00000 1.00000 -26.9489 - 13.8395 31.2366 0.00000 1.00000 -31.2366 - 13.8580 31.3496 0.00000 1.00000 -31.3496 - 13.8765 27.4511 0.00000 1.00000 -27.4511 - 13.8950 20.4697 0.00000 1.00000 -20.4697 - 13.9135 11.8582 0.00000 1.00000 -11.8582 - 13.9320 3.23523 0.00000 1.00000 -3.23523 - 13.9505 -3.99882 0.00000 1.00000 3.99882 - 13.9690 -8.96984 0.00000 1.00000 8.96984 - 13.9875 -11.4848 0.00000 1.00000 11.4848 - 14.0060 -11.9967 0.00000 1.00000 11.9967 - 14.0245 -11.3970 0.00000 1.00000 11.3970 - 14.0430 -10.7008 0.00000 1.00000 10.7008 - 14.0615 -10.7168 0.00000 1.00000 10.7168 - 14.0800 -11.7936 0.00000 1.00000 11.7936 - 14.0985 -13.7115 0.00000 1.00000 13.7115 - 14.1170 -15.7457 0.00000 1.00000 15.7457 - 14.1355 -16.8835 0.00000 1.00000 16.8835 - 14.1540 -16.1342 0.00000 1.00000 16.1342 - 14.1725 -12.8466 0.00000 1.00000 12.8466 - 14.1910 -6.94542 0.00000 1.00000 6.94542 - 14.2095 0.982134 0.00000 1.00000 -0.982134 - 14.2280 9.77953 0.00000 1.00000 -9.77953 - 14.2465 17.9729 0.00000 1.00000 -17.9729 - 14.2650 24.1178 0.00000 1.00000 -24.1178 - 14.2835 27.1485 0.00000 1.00000 -27.1485 - 14.3020 26.6355 0.00000 1.00000 -26.6355 - 14.3205 22.8839 0.00000 1.00000 -22.8839 - 14.3390 16.8479 0.00000 1.00000 -16.8479 - 14.3575 9.88786 0.00000 1.00000 -9.88786 - 14.3760 3.43554 0.00000 1.00000 -3.43554 - 14.3945 -1.34253 0.00000 1.00000 1.34253 - 14.4130 -3.79922 0.00000 1.00000 3.79922 - 14.4315 -3.91650 0.00000 1.00000 3.91650 - 14.4500 -2.25034 0.00000 1.00000 2.25034 - 14.4685 0.265934 0.00000 1.00000 -0.265934 - 14.4870 2.60091 0.00000 1.00000 -2.60091 - 14.5055 3.90902 0.00000 1.00000 -3.90902 - 14.5240 3.74411 0.00000 1.00000 -3.74411 - 14.5425 2.15013 0.00000 1.00000 -2.15013 - 14.5610 -0.388481 0.00000 1.00000 0.388481 - 14.5795 -3.11515 0.00000 1.00000 3.11515 - 14.5980 -5.23631 0.00000 1.00000 5.23631 - 14.6165 -6.15513 0.00000 1.00000 6.15513 - 14.6350 -5.63898 0.00000 1.00000 5.63898 - 14.6535 -3.87566 0.00000 1.00000 3.87566 - 14.6720 -1.40645 0.00000 1.00000 1.40645 - 14.6905 1.04029 0.00000 1.00000 -1.04029 - 14.7090 2.76304 0.00000 1.00000 -2.76304 - 14.7275 3.28473 0.00000 1.00000 -3.28473 - 14.7460 2.47788 0.00000 1.00000 -2.47788 - 14.7645 0.584519 0.00000 1.00000 -0.584519 - 14.7830 -1.87052 0.00000 1.00000 1.87052 - 14.8015 -4.24417 0.00000 1.00000 4.24417 - 14.8200 -5.96765 0.00000 1.00000 5.96765 - 14.8385 -6.70965 0.00000 1.00000 6.70965 - 14.8570 -6.46211 0.00000 1.00000 6.46211 - 14.8755 -5.52356 0.00000 1.00000 5.52356 - 14.8940 -4.38544 0.00000 1.00000 4.38544 - 14.9125 -3.55512 0.00000 1.00000 3.55512 - 14.9310 -3.36898 0.00000 1.00000 3.36898 - 14.9495 -3.85281 0.00000 1.00000 3.85281 - 14.9680 -4.67590 0.00000 1.00000 4.67590 - 14.9865 -5.21922 0.00000 1.00000 5.21922 - 15.0050 -4.74479 0.00000 1.00000 4.74479 - 15.0235 -2.62144 0.00000 1.00000 2.62144 - 15.0420 1.45687 0.00000 1.00000 -1.45687 - 15.0605 7.32500 0.00000 1.00000 -7.32500 - 15.0790 14.3193 0.00000 1.00000 -14.3193 - 15.0975 21.3835 0.00000 1.00000 -21.3835 - 15.1160 27.2852 0.00000 1.00000 -27.2852 - 15.1345 30.8902 0.00000 1.00000 -30.8902 - 15.1530 31.4245 0.00000 1.00000 -31.4245 - 15.1715 28.6588 0.00000 1.00000 -28.6588 - 15.1900 22.9682 0.00000 1.00000 -22.9682 - 15.2085 15.2541 0.00000 1.00000 -15.2541 - 15.2270 6.74712 0.00000 1.00000 -6.74712 - 15.2455 -1.25964 0.00000 1.00000 1.25964 - 15.2640 -7.68049 0.00000 1.00000 7.68049 - 15.2825 -11.8442 0.00000 1.00000 11.8442 - 15.3010 -13.5919 0.00000 1.00000 13.5919 - 15.3195 -13.2493 0.00000 1.00000 13.2493 - 15.3380 -11.4916 0.00000 1.00000 11.4916 - 15.3565 -9.14144 0.00000 1.00000 9.14144 - 15.3750 -6.95504 0.00000 1.00000 6.95504 - 15.3935 -5.44896 0.00000 1.00000 5.44896 - 15.4120 -4.80772 0.00000 1.00000 4.80772 - 15.4305 -4.88897 0.00000 1.00000 4.88897 - 15.4490 -5.31706 0.00000 1.00000 5.31706 - 15.4675 -5.63285 0.00000 1.00000 5.63285 - 15.4860 -5.45462 0.00000 1.00000 5.45462 - 15.5045 -4.60459 0.00000 1.00000 4.60459 - 15.5230 -3.16776 0.00000 1.00000 3.16776 - 15.5415 -1.46992 0.00000 1.00000 1.46992 - 15.5600 0.0157586 0.00000 1.00000 -0.0157586 - 15.5785 0.806047 0.00000 1.00000 -0.806047 - 15.5970 0.550242 0.00000 1.00000 -0.550242 - 15.6155 -0.861348 0.00000 1.00000 0.861348 - 15.6340 -3.25430 0.00000 1.00000 3.25430 - 15.6525 -6.20584 0.00000 1.00000 6.20584 - 15.6710 -9.14992 0.00000 1.00000 9.14992 - 15.6895 -11.5204 0.00000 1.00000 11.5204 - 15.7080 -12.8909 0.00000 1.00000 12.8909 - 15.7265 -13.0717 0.00000 1.00000 13.0717 - 15.7450 -12.1417 0.00000 1.00000 12.1417 - 15.7635 -10.4097 0.00000 1.00000 10.4097 - 15.7820 -8.32011 0.00000 1.00000 8.32011 - 15.8005 -6.33136 0.00000 1.00000 6.33136 - 15.8190 -4.80087 0.00000 1.00000 4.80087 - 15.8375 -3.90675 0.00000 1.00000 3.90675 - 15.8560 -3.62474 0.00000 1.00000 3.62474 - 15.8745 -3.76225 0.00000 1.00000 3.76225 - 15.8930 -4.03596 0.00000 1.00000 4.03596 - 15.9115 -4.16761 0.00000 1.00000 4.16761 - 15.9300 -3.96959 0.00000 1.00000 3.96959 - 15.9485 -3.39629 0.00000 1.00000 3.39629 - 15.9670 -2.54969 0.00000 1.00000 2.54969 - 15.9855 -1.64188 0.00000 1.00000 1.64188 - 16.0040 -0.928772 0.00000 1.00000 0.928772 - 16.0225 -0.634845 0.00000 1.00000 0.634845 - 16.0410 -0.888145 0.00000 1.00000 0.888145 - 16.0595 -1.67980 0.00000 1.00000 1.67980 - 16.0780 -2.85514 0.00000 1.00000 2.85514 - 16.0965 -4.13661 0.00000 1.00000 4.13661 - 16.1150 -5.17310 0.00000 1.00000 5.17310 - 16.1335 -5.60636 0.00000 1.00000 5.60636 - 16.1520 -5.14159 0.00000 1.00000 5.14159 - 16.1705 -3.60734 0.00000 1.00000 3.60734 - 16.1890 -0.992023 0.00000 1.00000 0.992023 - 16.2075 2.54958 0.00000 1.00000 -2.54958 - 16.2260 6.71807 0.00000 1.00000 -6.71807 - 16.2445 11.1120 0.00000 1.00000 -11.1120 - 16.2630 15.2812 0.00000 1.00000 -15.2812 - 16.2815 18.7822 0.00000 1.00000 -18.7822 - 16.3000 21.2269 0.00000 1.00000 -21.2269 - 16.3185 22.3212 0.00000 1.00000 -22.3212 - 16.3370 21.8912 0.00000 1.00000 -21.8912 - 16.3555 19.8991 0.00000 1.00000 -19.8991 - 16.3740 16.4493 0.00000 1.00000 -16.4493 - 16.3925 11.7863 0.00000 1.00000 -11.7863 - 16.4110 6.28331 0.00000 1.00000 -6.28331 - 16.4295 0.418687 0.00000 1.00000 -0.418687 - 16.4480 -5.25963 0.00000 1.00000 5.25963 - 16.4665 -10.1842 0.00000 1.00000 10.1842 - 16.4850 -13.8295 0.00000 1.00000 13.8295 - 16.5035 -15.7785 0.00000 1.00000 15.7785 - 16.5220 -15.7830 0.00000 1.00000 15.7830 - 16.5405 -13.8070 0.00000 1.00000 13.8070 - 16.5590 -10.0391 0.00000 1.00000 10.0391 - 16.5775 -4.87264 0.00000 1.00000 4.87264 - 16.5960 1.14589 0.00000 1.00000 -1.14589 - 16.6145 7.38649 0.00000 1.00000 -7.38649 - 16.6330 13.2091 0.00000 1.00000 -13.2091 - 16.6515 18.0296 0.00000 1.00000 -18.0296 - 16.6700 21.3708 0.00000 1.00000 -21.3708 - 16.6885 22.8991 0.00000 1.00000 -22.8991 - 16.7070 22.4456 0.00000 1.00000 -22.4456 - 16.7255 20.0158 0.00000 1.00000 -20.0158 - 16.7440 15.7881 0.00000 1.00000 -15.7881 - 16.7625 10.1035 0.00000 1.00000 -10.1035 - 16.7810 3.44424 0.00000 1.00000 -3.44424 - 16.7995 -3.59847 0.00000 1.00000 3.59847 - 16.8180 -10.3717 0.00000 1.00000 10.3717 - 16.8365 -16.2205 0.00000 1.00000 16.2205 - 16.8550 -20.5580 0.00000 1.00000 20.5580 - 16.8735 -22.9372 0.00000 1.00000 22.9372 - 16.8920 -23.1129 0.00000 1.00000 23.1129 - 16.9105 -21.0837 0.00000 1.00000 21.0837 - 16.9290 -17.1032 0.00000 1.00000 17.1032 - 16.9475 -11.6563 0.00000 1.00000 11.6563 - 16.9660 -5.39998 0.00000 1.00000 5.39998 - 16.9845 0.923758 0.00000 1.00000 -0.923758 - 17.0030 6.59122 0.00000 1.00000 -6.59122 - 17.0215 10.9979 0.00000 1.00000 -10.9979 - 17.0400 13.7383 0.00000 1.00000 -13.7383 - 17.0585 14.6477 0.00000 1.00000 -14.6477 - 17.0770 13.7998 0.00000 1.00000 -13.7998 - 17.0955 11.4638 0.00000 1.00000 -11.4638 - 17.1140 8.03578 0.00000 1.00000 -8.03578 - 17.1325 3.96378 0.00000 1.00000 -3.96378 - 17.1510 -0.316698 0.00000 1.00000 0.316698 - 17.1695 -4.42438 0.00000 1.00000 4.42438 - 17.1880 -8.04681 0.00000 1.00000 8.04681 - 17.2065 -10.9324 0.00000 1.00000 10.9324 - 17.2250 -12.8725 0.00000 1.00000 12.8725 - 17.2435 -13.6898 0.00000 1.00000 13.6898 - 17.2620 -13.2456 0.00000 1.00000 13.2456 - 17.2805 -11.4675 0.00000 1.00000 11.4675 - 17.2990 -8.39144 0.00000 1.00000 8.39144 - 17.3175 -4.20001 0.00000 1.00000 4.20001 - 17.3360 0.758004 0.00000 1.00000 -0.758004 - 17.3545 5.98116 0.00000 1.00000 -5.98116 - 17.3730 10.8661 0.00000 1.00000 -10.8661 - 17.3915 14.7906 0.00000 1.00000 -14.7906 - 17.4100 17.2137 0.00000 1.00000 -17.2137 - 17.4285 17.7745 0.00000 1.00000 -17.7745 - 17.4470 16.3661 0.00000 1.00000 -16.3661 - 17.4655 13.1690 0.00000 1.00000 -13.1690 - 17.4840 8.63053 0.00000 1.00000 -8.63053 - 17.5025 3.39246 0.00000 1.00000 -3.39246 - 17.5210 -1.82203 0.00000 1.00000 1.82203 - 17.5395 -6.33848 0.00000 1.00000 6.33848 - 17.5580 -9.64981 0.00000 1.00000 9.64981 - 17.5765 -11.4978 0.00000 1.00000 11.4978 - 17.5950 -11.9009 0.00000 1.00000 11.9009 - 17.6135 -11.1239 0.00000 1.00000 11.1239 - 17.6320 -9.59944 0.00000 1.00000 9.59944 - 17.6505 -7.81972 0.00000 1.00000 7.81972 - 17.6690 -6.22442 0.00000 1.00000 6.22442 - 17.6875 -5.11122 0.00000 1.00000 5.11122 - 17.7060 -4.58875 0.00000 1.00000 4.58875 - 17.7245 -4.58029 0.00000 1.00000 4.58029 - 17.7430 -4.87225 0.00000 1.00000 4.87225 - 17.7615 -5.18968 0.00000 1.00000 5.18968 - 17.7800 -5.27616 0.00000 1.00000 5.27616 - 17.7985 -4.95771 0.00000 1.00000 4.95771 - 17.8170 -4.17763 0.00000 1.00000 4.17763 - 17.8355 -2.99861 0.00000 1.00000 2.99861 - 17.8540 -1.57655 0.00000 1.00000 1.57655 - 17.8725 -0.115674 0.00000 1.00000 0.115674 - 17.8910 1.18232 0.00000 1.00000 -1.18232 - 17.9095 2.16253 0.00000 1.00000 -2.16253 - 17.9280 2.74507 0.00000 1.00000 -2.74507 - 17.9465 2.93310 0.00000 1.00000 -2.93310 - 17.9650 2.80225 0.00000 1.00000 -2.80225 - 17.9835 2.47685 0.00000 1.00000 -2.47685 - 18.0020 2.09940 0.00000 1.00000 -2.09940 - 18.0205 1.79907 0.00000 1.00000 -1.79907 - 18.0390 1.66403 0.00000 1.00000 -1.66403 - 18.0575 1.72260 0.00000 1.00000 -1.72260 - 18.0760 1.93703 0.00000 1.00000 -1.93703 - 18.0945 2.21113 0.00000 1.00000 -2.21113 - 18.1130 2.40837 0.00000 1.00000 -2.40837 - 18.1315 2.37442 0.00000 1.00000 -2.37442 - 18.1500 1.95988 0.00000 1.00000 -1.95988 - 18.1685 1.04724 0.00000 1.00000 -1.04724 - 18.1870 -0.426523 0.00000 1.00000 0.426523 - 18.2055 -2.45315 0.00000 1.00000 2.45315 - 18.2240 -4.90773 0.00000 1.00000 4.90773 - 18.2425 -7.52944 0.00000 1.00000 7.52944 - 18.2610 -9.92715 0.00000 1.00000 9.92715 - 18.2795 -11.6174 0.00000 1.00000 11.6174 - 18.2980 -12.0956 0.00000 1.00000 12.0956 - 18.3165 -10.9327 0.00000 1.00000 10.9327 - 18.3350 -7.88331 0.00000 1.00000 7.88331 - 18.3535 -2.98071 0.00000 1.00000 2.98071 - 18.3720 3.40650 0.00000 1.00000 -3.40650 - 18.3905 10.5811 0.00000 1.00000 -10.5811 - 18.4090 17.5968 0.00000 1.00000 -17.5968 - 18.4275 23.4036 0.00000 1.00000 -23.4036 - 18.4460 27.0310 0.00000 1.00000 -27.0310 - 18.4645 27.7731 0.00000 1.00000 -27.7731 - 18.4830 25.3345 0.00000 1.00000 -25.3345 - 18.5015 19.9052 0.00000 1.00000 -19.9052 - 18.5200 12.1472 0.00000 1.00000 -12.1472 - 18.5385 3.09099 0.00000 1.00000 -3.09099 - 18.5570 -6.03798 0.00000 1.00000 6.03798 - 18.5755 -14.0281 0.00000 1.00000 14.0281 - 18.5940 -19.8843 0.00000 1.00000 19.8843 - 18.6125 -22.9844 0.00000 1.00000 22.9844 - 18.6310 -23.1597 0.00000 1.00000 23.1597 - 18.6495 -20.6881 0.00000 1.00000 20.6881 - 18.6680 -16.2075 0.00000 1.00000 16.2075 - 18.6865 -10.5714 0.00000 1.00000 10.5714 - 18.7050 -4.68098 0.00000 1.00000 4.68098 - 18.7235 0.671251 0.00000 1.00000 -0.671251 - 18.7420 4.91529 0.00000 1.00000 -4.91529 - 18.7605 7.75797 0.00000 1.00000 -7.75797 - 18.7790 9.17588 0.00000 1.00000 -9.17588 - 18.7975 9.35965 0.00000 1.00000 -9.35965 - 18.8160 8.63035 0.00000 1.00000 -8.63035 - 18.8345 7.35145 0.00000 1.00000 -7.35145 - 18.8530 5.85510 0.00000 1.00000 -5.85510 - 18.8715 4.39513 0.00000 1.00000 -4.39513 - 18.8900 3.13002 0.00000 1.00000 -3.13002 - 18.9085 2.13168 0.00000 1.00000 -2.13168 - 18.9270 1.40976 0.00000 1.00000 -1.40976 - 18.9455 0.939913 0.00000 1.00000 -0.939913 - 18.9640 0.686429 0.00000 1.00000 -0.686429 - 18.9825 0.614229 0.00000 1.00000 -0.614229 - 19.0010 0.690570 0.00000 1.00000 -0.690570 - 19.0195 0.880032 0.00000 1.00000 -0.880032 - 19.0380 1.13788 0.00000 1.00000 -1.13788 - 19.0565 1.40627 0.00000 1.00000 -1.40627 - 19.0750 1.61604 0.00000 1.00000 -1.61604 - 19.0935 1.69418 0.00000 1.00000 -1.69418 - 19.1120 1.57467 0.00000 1.00000 -1.57467 - 19.1305 1.20912 0.00000 1.00000 -1.20912 - 19.1490 0.574418 0.00000 1.00000 -0.574418 - 19.1675 -0.322868 0.00000 1.00000 0.322868 - 19.1860 -1.44364 0.00000 1.00000 1.44364 - 19.2045 -2.71278 0.00000 1.00000 2.71278 - 19.2230 -4.01492 0.00000 1.00000 4.01492 - 19.2415 -5.19189 0.00000 1.00000 5.19189 - 19.2600 -6.04623 0.00000 1.00000 6.04623 - 19.2785 -6.35560 0.00000 1.00000 6.35560 - 19.2970 -5.90135 0.00000 1.00000 5.90135 - 19.3155 -4.51168 0.00000 1.00000 4.51168 - 19.3340 -2.11474 0.00000 1.00000 2.11474 - 19.3525 1.20914 0.00000 1.00000 -1.20914 - 19.3710 5.19105 0.00000 1.00000 -5.19105 - 19.3895 9.36912 0.00000 1.00000 -9.36912 - 19.4080 13.1271 0.00000 1.00000 -13.1271 - 19.4265 15.7779 0.00000 1.00000 -15.7779 - 19.4450 16.6827 0.00000 1.00000 -16.6827 - 19.4635 15.3867 0.00000 1.00000 -15.3867 - 19.4820 11.7418 0.00000 1.00000 -11.7418 - 19.5005 5.98757 0.00000 1.00000 -5.98757 - 19.5190 -1.23710 0.00000 1.00000 1.23710 - 19.5375 -8.96359 0.00000 1.00000 8.96359 - 19.5560 -16.0382 0.00000 1.00000 16.0382 - 19.5745 -21.3164 0.00000 1.00000 21.3164 - 19.5930 -23.8699 0.00000 1.00000 23.8699 - 19.6115 -23.1644 0.00000 1.00000 23.1644 - 19.6300 -19.1740 0.00000 1.00000 19.1740 - 19.6485 -12.4057 0.00000 1.00000 12.4057 - 19.6670 -3.82669 0.00000 1.00000 3.82669 - 19.6855 5.29471 0.00000 1.00000 -5.29471 - 19.7040 13.6058 0.00000 1.00000 -13.6058 - 19.7225 19.9014 0.00000 1.00000 -19.9014 - 19.7410 23.3260 0.00000 1.00000 -23.3260 - 19.7595 23.5068 0.00000 1.00000 -23.5068 - 19.7780 20.5929 0.00000 1.00000 -20.5929 - 19.7965 15.1973 0.00000 1.00000 -15.1973 - 19.8150 8.25741 0.00000 1.00000 -8.25741 - 19.8335 0.846490 0.00000 1.00000 -0.846490 - 19.8520 -6.02165 0.00000 1.00000 6.02165 - 19.8705 -11.5565 0.00000 1.00000 11.5565 - 19.8890 -15.2939 0.00000 1.00000 15.2939 - 19.9075 -17.1257 0.00000 1.00000 17.1257 - 19.9260 -17.2573 0.00000 1.00000 17.2573 - 19.9445 -16.1119 0.00000 1.00000 16.1119 - 19.9630 -14.2055 0.00000 1.00000 14.2055 - 19.9815 -12.0275 0.00000 1.00000 12.0275 - 20.0000 -9.95383 0.00000 1.00000 9.95383 diff --git a/tests/testdata/Ni.stru b/tests/testdata/Ni.stru deleted file mode 100644 index b4da517c..00000000 --- a/tests/testdata/Ni.stru +++ /dev/null @@ -1,33 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/PbScW25TiO3.stru b/tests/testdata/PbScW25TiO3.stru deleted file mode 100644 index 71ba3651..00000000 --- a/tests/testdata/PbScW25TiO3.stru +++ /dev/null @@ -1,345 +0,0 @@ -title Pb8 (Sc16/3 W8/3)0.75 (Ti8)0.25 O24, B factors from BNL2 -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 8.072700, 8.072700, 8.072700, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 56 -atoms -PB 0.25000000 0.25000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.25000000 0.75000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.25000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.75000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.25000000 0.25000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.25000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.25000000 0.75000000 0.25000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -PB 0.75000000 0.75000000 0.75000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.04795025 0.04795025 0.04795025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.00000000 0.25735000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.50000000 0.75735003 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.00000000 0.75735003 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.50000000 0.25735000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.00000000 0.74264997 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.50000000 0.24265000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.00000000 0.24265000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.50000000 0.74264997 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.25735000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.75735003 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.75735003 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.25735000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.74264997 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.24265000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.24265000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.74264997 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.25735000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.75735003 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.75735003 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.25735000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.74264997 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.24265000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.00000000 0.24265000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -O 0.50000000 0.74264997 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.02293025 0.02293025 0.02293025 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.00000000 0.00000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.50000000 0.50000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.00000000 0.50000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.50000000 0.00000000 0.9739 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.50000000 0.50000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.50000000 0.00000000 0.00000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.50000000 0.00000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SC 0.00000000 0.00000000 0.50000000 0.0261 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.00000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.50000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.00000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.50000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.50000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.50000000 0.00000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.50000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -W 0.00000000 0.00000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.00000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.50000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.00000000 0.50000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.50000000 0.00000000 0.0131 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.50000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.50000000 0.00000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.50000000 0.00000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -TI 0.00000000 0.00000000 0.50000000 0.4869 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00809050 0.00809050 0.00809050 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/badNi.dat b/tests/testdata/badNi.dat deleted file mode 100644 index ef5b7007..00000000 --- a/tests/testdata/badNi.dat +++ /dev/null @@ -1,1001 +0,0 @@ - 1.50000 -0.539443 0.00000 1.00000 0.539443 - 1.51850 -1.03098 0.00000 1.00000 1.03098 - 1.53700 -1.43712 0.00000 1.00000 1.43712 - 1.55550 -1.73810 0.00000 1.00000 1.73810 - 1.57400 -1.93402 0.00000 1.00000 1.93402 - 1.59250 -2.04145 0.00000 1.00000 2.04145 - 1.61100 -2.08593 0.00000 1.00000 2.08593 - 1.62950 -2.09295 0.00000 1.00000 2.09295 - 1.64800 -2.08072 0.00000 1.00000 2.08072 - 1.66650 -2.05688 0.00000 1.00000 2.05688 - 1.68500 -2.02006 0.00000 1.00000 2.02006 - 1.70350 -1.96554 0.00000 1.00000 1.96554 - 1.72200 -1.89239 0.00000 1.00000 1.89239 - 1.74050 -1.80936 0.00000 1.00000 1.80936 - 1.75900 -1.73670 0.00000 1.00000 1.73670 - 1.77750 -1.70255 0.00000 1.00000 1.70255 - 1.79600 -1.73461 0.00000 1.00000 1.73461 - 1.81450 -1.84946 0.00000 1.00000 1.84946 - 1.83300 -2.04300 0.00000 1.00000 2.04300 - 1.85150 -2.28566 0.00000 1.00000 2.28566 - 1.87000 -2.52486 0.00000 1.00000 2.52486 - 1.88850 -2.69615 0.00000 1.00000 2.69615 - 1.92700 -2.74180 0.00000 1.00000 2.74180 - 1.92550 -2.63223 0.00000 1.00000 2.63223 - 1.94400 -2.38239 0.00000 1.00000 2.38239 - 1.96250 -2.05565 0.00000 1.00000 2.05565 - 1.98100 -1.75092 0.00000 1.00000 1.75092 - 1.99950 -1.57518 0.00000 1.00000 1.57518 - 2.01800 -1.60914 0.00000 1.00000 1.60914 - 2.03650 -1.87687 0.00000 1.00000 1.87687 - 2.05500 -2.33004 0.00000 1.00000 2.33004 - 2.07350 -2.85357 0.00000 1.00000 2.85357 - 2.09200 -3.29353 0.00000 1.00000 3.29353 - 2.11050 -3.50124 0.00000 1.00000 3.50124 - 2.12900 -3.38172 0.00000 1.00000 3.38172 - 2.14750 -2.93205 0.00000 1.00000 2.93205 - 2.16600 -2.25629 0.00000 1.00000 2.25629 - 2.18450 -1.54918 0.00000 1.00000 1.54918 - 2.20300 -1.04888 0.00000 1.00000 1.04888 - 2.22150 -0.968136 0.00000 1.00000 0.968136 - 2.24000 -1.42070 0.00000 1.00000 1.42070 - 2.25850 -2.36300 0.00000 1.00000 2.36300 - 2.27700 -3.56960 0.00000 1.00000 3.56960 - 2.29550 -4.65416 0.00000 1.00000 4.65416 - 2.31400 -5.13684 0.00000 1.00000 5.13684 - 2.33250 -4.54696 0.00000 1.00000 4.54696 - 2.35100 -2.53890 0.00000 1.00000 2.53890 - 2.36950 1.00656 0.00000 1.00000 -1.00656 - 2.38800 5.92223 0.00000 1.00000 -5.92223 - 2.40650 11.7527 0.00000 1.00000 -11.7527 - 2.42500 17.8143 0.00000 1.00000 -17.8143 - 2.44350 23.3057 0.00000 1.00000 -23.3057 - 2.46200 27.4478 0.00000 1.00000 -27.4478 - 2.48050 29.6246 0.00000 1.00000 -29.6246 - 2.49900 29.4986 0.00000 1.00000 -29.4986 - 2.51750 27.0749 0.00000 1.00000 -27.0749 - 2.53600 22.7028 0.00000 1.00000 -22.7028 - 2.55450 17.0112 0.00000 1.00000 -17.0112 - 2.57300 10.7932 0.00000 1.00000 -10.7932 - 2.59150 4.86134 0.00000 1.00000 -4.86134 - 2.61000 -0.0945224 0.00000 1.00000 0.0945224 - 2.62850 -3.61858 0.00000 1.00000 3.61858 - 2.64700 -5.54803 0.00000 1.00000 5.54803 - 2.66550 -6.01016 0.00000 1.00000 6.01016 - 2.68400 -5.36293 0.00000 1.00000 5.36293 - 2.70250 -4.09596 0.00000 1.00000 4.09596 - 2.72100 -2.71625 0.00000 1.00000 2.71625 - 2.73950 -1.64382 0.00000 1.00000 1.64382 - 2.75800 -1.13791 0.00000 1.00000 1.13791 - 2.77650 -1.26649 0.00000 1.00000 1.26649 - 2.79500 -1.92103 0.00000 1.00000 1.92103 - 2.81350 -2.86890 0.00000 1.00000 2.86890 - 2.83200 -3.82782 0.00000 1.00000 3.82782 - 2.85050 -4.54328 0.00000 1.00000 4.54328 - 2.86900 -4.85054 0.00000 1.00000 4.85054 - 2.88750 -4.70809 0.00000 1.00000 4.70809 - 2.90600 -4.19687 0.00000 1.00000 4.19687 - 2.92450 -3.48841 0.00000 1.00000 3.48841 - 2.94300 -2.79256 0.00000 1.00000 2.79256 - 2.96150 -2.29993 0.00000 1.00000 2.29993 - 2.98000 -2.13422 0.00000 1.00000 2.13422 - 2.99850 -2.32552 0.00000 1.00000 2.32552 - 3.01700 -2.80931 0.00000 1.00000 2.80931 - 3.03550 -3.44928 0.00000 1.00000 3.44928 - 3.05400 -4.07624 0.00000 1.00000 4.07624 - 3.07250 -4.53264 0.00000 1.00000 4.53264 - 3.09100 -4.71141 0.00000 1.00000 4.71141 - 3.10950 -4.58013 0.00000 1.00000 4.58013 - 3.12800 -4.18572 0.00000 1.00000 4.18572 - 3.14650 -3.63955 0.00000 1.00000 3.63955 - 3.16500 -3.08796 0.00000 1.00000 3.08796 - 3.18350 -2.67579 0.00000 1.00000 2.67579 - 3.20200 -2.51194 0.00000 1.00000 2.51194 - 3.22050 -2.64475 0.00000 1.00000 2.64475 - 3.23900 -3.05186 0.00000 1.00000 3.05186 - 3.25750 -3.64576 0.00000 1.00000 3.64576 - 3.27600 -4.29257 0.00000 1.00000 4.29257 - 3.29450 -4.83876 0.00000 1.00000 4.83876 - 3.31300 -5.14008 0.00000 1.00000 5.14008 - 3.33150 -5.08721 0.00000 1.00000 5.08721 - 3.35000 -4.62391 0.00000 1.00000 4.62391 - 3.36850 -3.75470 0.00000 1.00000 3.75470 - 3.38700 -2.54063 0.00000 1.00000 2.54063 - 3.40550 -1.08396 0.00000 1.00000 1.08396 - 3.42400 0.493223 0.00000 1.00000 -0.493223 - 3.44250 2.06874 0.00000 1.00000 -2.06874 - 3.46100 3.53152 0.00000 1.00000 -3.53152 - 3.47950 4.78254 0.00000 1.00000 -4.78254 - 3.49800 5.72969 0.00000 1.00000 -5.72969 - 3.51650 6.28423 0.00000 1.00000 -6.28423 - 3.53500 6.36504 0.00000 1.00000 -6.36504 - 3.55350 5.91247 0.00000 1.00000 -5.91247 - 3.57200 4.90861 0.00000 1.00000 -4.90861 - 3.59050 3.39740 0.00000 1.00000 -3.39740 - 3.60900 1.49612 0.00000 1.00000 -1.49612 - 3.62750 -0.608193 0.00000 1.00000 0.608193 - 3.64600 -2.68019 0.00000 1.00000 2.68019 - 3.66450 -4.47243 0.00000 1.00000 4.47243 - 3.68300 -5.76925 0.00000 1.00000 5.76925 - 3.70150 -6.42920 0.00000 1.00000 6.42920 - 3.72000 -6.41719 0.00000 1.00000 6.41719 - 3.73850 -5.81875 0.00000 1.00000 5.81875 - 3.75700 -4.83074 0.00000 1.00000 4.83074 - 3.77550 -3.72667 0.00000 1.00000 3.72667 - 3.79400 -2.80071 0.00000 1.00000 2.80071 - 3.81250 -2.30147 0.00000 1.00000 2.30147 - 3.83100 -2.37126 0.00000 1.00000 2.37126 - 3.84950 -3.00713 0.00000 1.00000 3.00713 - 3.86800 -4.05566 0.00000 1.00000 4.05566 - 3.88650 -5.24604 0.00000 1.00000 5.24604 - 3.90500 -6.25585 0.00000 1.00000 6.25585 - 3.92350 -6.79521 0.00000 1.00000 6.79521 - 3.94200 -6.68830 0.00000 1.00000 6.68830 - 3.96050 -5.93010 0.00000 1.00000 5.93010 - 3.97900 -4.70113 0.00000 1.00000 4.70113 - 3.99750 -3.33259 0.00000 1.00000 3.33259 - 4.01600 -2.22683 0.00000 1.00000 2.22683 - 4.03450 -1.75037 0.00000 1.00000 1.75037 - 4.05300 -2.12498 0.00000 1.00000 2.12498 - 4.07150 -3.34471 0.00000 1.00000 3.34471 - 4.09000 -5.14253 0.00000 1.00000 5.14253 - 4.10850 -7.01935 0.00000 1.00000 7.01935 - 4.12700 -8.33391 0.00000 1.00000 8.33391 - 4.14550 -8.43660 0.00000 1.00000 8.43660 - 4.16400 -6.81920 0.00000 1.00000 6.81920 - 4.18250 -3.24667 0.00000 1.00000 3.24667 - 4.20100 2.16009 0.00000 1.00000 -2.16009 - 4.21950 8.91152 0.00000 1.00000 -8.91152 - 4.23800 16.2134 0.00000 1.00000 -16.2134 - 4.25650 23.0973 0.00000 1.00000 -23.0973 - 4.27500 28.5935 0.00000 1.00000 -28.5935 - 4.29350 31.9106 0.00000 1.00000 -31.9106 - 4.31200 32.5842 0.00000 1.00000 -32.5842 - 4.33050 30.5617 0.00000 1.00000 -30.5617 - 4.34900 26.2027 0.00000 1.00000 -26.2027 - 4.36750 20.1990 0.00000 1.00000 -20.1990 - 4.38600 13.4320 0.00000 1.00000 -13.4320 - 4.40450 6.80337 0.00000 1.00000 -6.80337 - 4.42300 1.07527 0.00000 1.00000 -1.07527 - 4.44150 -3.24700 0.00000 1.00000 3.24700 - 4.46000 -5.96945 0.00000 1.00000 5.96945 - 4.47850 -7.19581 0.00000 1.00000 7.19581 - 4.49700 -7.25613 0.00000 1.00000 7.25613 - 4.51550 -6.59972 0.00000 1.00000 6.59972 - 4.53400 -5.68054 0.00000 1.00000 5.68054 - 4.55250 -4.86170 0.00000 1.00000 4.86170 - 4.57100 -4.35835 0.00000 1.00000 4.35835 - 4.58950 -4.22677 0.00000 1.00000 4.22677 - 4.60800 -4.39508 0.00000 1.00000 4.39508 - 4.62650 -4.72130 0.00000 1.00000 4.72130 - 4.64500 -5.05871 0.00000 1.00000 5.05871 - 4.66350 -5.30848 0.00000 1.00000 5.30848 - 4.68200 -5.44197 0.00000 1.00000 5.44197 - 4.70050 -5.50097 0.00000 1.00000 5.50097 - 4.71900 -5.56456 0.00000 1.00000 5.56456 - 4.73750 -5.69659 0.00000 1.00000 5.69659 - 4.75600 -5.90806 0.00000 1.00000 5.90806 - 4.77450 -6.13525 0.00000 1.00000 6.13525 - 4.79300 -6.24364 0.00000 1.00000 6.24364 - 4.81150 -6.05670 0.00000 1.00000 6.05670 - 4.83000 -5.40165 0.00000 1.00000 5.40165 - 4.84850 -4.16022 0.00000 1.00000 4.16022 - 4.86700 -2.31100 0.00000 1.00000 2.31100 - 4.88550 0.0479985 0.00000 1.00000 -0.0479985 - 4.90400 2.70271 0.00000 1.00000 -2.70271 - 4.92250 5.35252 0.00000 1.00000 -5.35252 - 4.94100 7.65960 0.00000 1.00000 -7.65960 - 4.95950 9.30734 0.00000 1.00000 -9.30734 - 4.97800 10.0558 0.00000 1.00000 -10.0558 - 4.99650 9.78268 0.00000 1.00000 -9.78268 - 5.01500 8.50309 0.00000 1.00000 -8.50309 - 5.03350 6.36470 0.00000 1.00000 -6.36470 - 5.05200 3.62252 0.00000 1.00000 -3.62252 - 5.07050 0.599290 0.00000 1.00000 -0.599290 - 5.08900 -2.36086 0.00000 1.00000 2.36086 - 5.10750 -4.93870 0.00000 1.00000 4.93870 - 5.12600 -6.88149 0.00000 1.00000 6.88149 - 5.14450 -8.03565 0.00000 1.00000 8.03565 - 5.16300 -8.36668 0.00000 1.00000 8.36668 - 5.18150 -7.96304 0.00000 1.00000 7.96304 - 5.20000 -7.02207 0.00000 1.00000 7.02207 - 5.21850 -5.81895 0.00000 1.00000 5.81895 - 5.23700 -4.66171 0.00000 1.00000 4.66171 - 5.25550 -3.83844 0.00000 1.00000 3.83844 - 5.27400 -3.56410 0.00000 1.00000 3.56410 - 5.29250 -3.93573 0.00000 1.00000 3.93573 - 5.31100 -4.90467 0.00000 1.00000 4.90467 - 5.32950 -6.27267 0.00000 1.00000 6.27267 - 5.34800 -7.71536 0.00000 1.00000 7.71536 - 5.36650 -8.83203 0.00000 1.00000 8.83203 - 5.38500 -9.21516 0.00000 1.00000 9.21516 - 5.40350 -8.52808 0.00000 1.00000 8.52808 - 5.42200 -6.57611 0.00000 1.00000 6.57611 - 5.44050 -3.35625 0.00000 1.00000 3.35625 - 5.45900 0.925287 0.00000 1.00000 -0.925287 - 5.47750 5.87209 0.00000 1.00000 -5.87209 - 5.49600 10.9500 0.00000 1.00000 -10.9500 - 5.51450 15.5640 0.00000 1.00000 -15.5640 - 5.53300 19.1477 0.00000 1.00000 -19.1477 - 5.55150 21.2490 0.00000 1.00000 -21.2490 - 5.57000 21.6003 0.00000 1.00000 -21.6003 - 5.58850 20.1588 0.00000 1.00000 -20.1588 - 5.60700 17.1124 0.00000 1.00000 -17.1124 - 5.62550 12.8494 0.00000 1.00000 -12.8494 - 5.64400 7.89927 0.00000 1.00000 -7.89927 - 5.66250 2.85190 0.00000 1.00000 -2.85190 - 5.68100 -1.72997 0.00000 1.00000 1.72997 - 5.69950 -5.39381 0.00000 1.00000 5.39381 - 5.71800 -7.86162 0.00000 1.00000 7.86162 - 5.73650 -9.06420 0.00000 1.00000 9.06420 - 5.75500 -9.13837 0.00000 1.00000 9.13837 - 5.77350 -8.38683 0.00000 1.00000 8.38683 - 5.79200 -7.20818 0.00000 1.00000 7.20818 - 5.81050 -6.01172 0.00000 1.00000 6.01172 - 5.82900 -5.13567 0.00000 1.00000 5.13567 - 5.84750 -4.78662 0.00000 1.00000 4.78662 - 5.86600 -5.01125 0.00000 1.00000 5.01125 - 5.88450 -5.70222 0.00000 1.00000 5.70222 - 5.90300 -6.63275 0.00000 1.00000 6.63275 - 5.92150 -7.51031 0.00000 1.00000 7.51031 - 5.94000 -8.03914 0.00000 1.00000 8.03914 - 5.95850 -7.98163 0.00000 1.00000 7.98163 - 5.97700 -7.20897 0.00000 1.00000 7.20897 - 5.99550 -5.73309 0.00000 1.00000 5.73309 - 6.01400 -3.71335 0.00000 1.00000 3.71335 - 6.03250 -1.43572 0.00000 1.00000 1.43572 - 6.05100 0.734316 0.00000 1.00000 -0.734316 - 6.06950 2.41816 0.00000 1.00000 -2.41816 - 6.08800 3.29880 0.00000 1.00000 -3.29880 - 6.10650 3.18922 0.00000 1.00000 -3.18922 - 6.12500 2.07961 0.00000 1.00000 -2.07961 - 6.14350 0.150522 0.00000 1.00000 -0.150522 - 6.16200 -2.25436 0.00000 1.00000 2.25436 - 6.18050 -4.69426 0.00000 1.00000 4.69426 - 6.19900 -6.72460 0.00000 1.00000 6.72460 - 6.21750 -7.99834 0.00000 1.00000 7.99834 - 6.23600 -8.35142 0.00000 1.00000 8.35142 - 6.25450 -7.84948 0.00000 1.00000 7.84948 - 6.27300 -6.78013 0.00000 1.00000 6.78013 - 6.29150 -5.58671 0.00000 1.00000 5.58671 - 6.31000 -4.75441 0.00000 1.00000 4.75441 - 6.32850 -4.67266 0.00000 1.00000 4.67266 - 6.34700 -5.50714 0.00000 1.00000 5.50714 - 6.36550 -7.11590 0.00000 1.00000 7.11590 - 6.38400 -9.03699 0.00000 1.00000 9.03699 - 6.40250 -10.5592 0.00000 1.00000 10.5592 - 6.42100 -10.8676 0.00000 1.00000 10.8676 - 6.43950 -9.23379 0.00000 1.00000 9.23379 - 6.45800 -5.20861 0.00000 1.00000 5.20861 - 6.47650 1.23011 0.00000 1.00000 -1.23011 - 6.49500 9.61241 0.00000 1.00000 -9.61241 - 6.51350 19.0142 0.00000 1.00000 -19.0142 - 6.53200 28.1967 0.00000 1.00000 -28.1967 - 6.55050 35.8243 0.00000 1.00000 -35.8243 - 6.56900 40.7166 0.00000 1.00000 -40.7166 - 6.58750 42.0833 0.00000 1.00000 -42.0833 - 6.60600 39.6873 0.00000 1.00000 -39.6873 - 6.62450 33.8989 0.00000 1.00000 -33.8989 - 6.64300 25.6256 0.00000 1.00000 -25.6256 - 6.66150 16.1324 0.00000 1.00000 -16.1324 - 6.68000 6.79125 0.00000 1.00000 -6.79125 - 6.69850 -1.18411 0.00000 1.00000 1.18411 - 6.71700 -6.95910 0.00000 1.00000 6.95910 - 6.73550 -10.2079 0.00000 1.00000 10.2079 - 6.75400 -11.1248 0.00000 1.00000 11.1248 - 6.77250 -10.3198 0.00000 1.00000 10.3198 - 6.79100 -8.62815 0.00000 1.00000 8.62815 - 6.80950 -6.88571 0.00000 1.00000 6.88571 - 6.82800 -5.72660 0.00000 1.00000 5.72660 - 6.84650 -5.45332 0.00000 1.00000 5.45332 - 6.86500 -6.00649 0.00000 1.00000 6.00649 - 6.88350 -7.03437 0.00000 1.00000 7.03437 - 6.90200 -8.03570 0.00000 1.00000 8.03570 - 6.92050 -8.53209 0.00000 1.00000 8.53209 - 6.93900 -8.22002 0.00000 1.00000 8.22002 - 6.95750 -7.06140 0.00000 1.00000 7.06140 - 6.97600 -5.29017 0.00000 1.00000 5.29017 - 6.99450 -3.33754 0.00000 1.00000 3.33754 - 7.01300 -1.70148 0.00000 1.00000 1.70148 - 7.03150 -0.800760 0.00000 1.00000 0.800760 - 7.05000 -0.856664 0.00000 1.00000 0.856664 - 7.06850 -1.83505 0.00000 1.00000 1.83505 - 7.08700 -3.46358 0.00000 1.00000 3.46358 - 7.10550 -5.31731 0.00000 1.00000 5.31731 - 7.12400 -6.94715 0.00000 1.00000 6.94715 - 7.14250 -8.01332 0.00000 1.00000 8.01332 - 7.16100 -8.38320 0.00000 1.00000 8.38320 - 7.17950 -8.16268 0.00000 1.00000 8.16268 - 7.19800 -7.64952 0.00000 1.00000 7.64952 - 7.21650 -7.22129 0.00000 1.00000 7.22129 - 7.23500 -7.19206 0.00000 1.00000 7.19206 - 7.25350 -7.68220 0.00000 1.00000 7.68220 - 7.27200 -8.54371 0.00000 1.00000 8.54371 - 7.29050 -9.36819 0.00000 1.00000 9.36819 - 7.30900 -9.58072 0.00000 1.00000 9.58072 - 7.32750 -8.59790 0.00000 1.00000 8.59790 - 7.34600 -6.00785 0.00000 1.00000 6.00785 - 7.36450 -1.72106 0.00000 1.00000 1.72106 - 7.38300 3.95269 0.00000 1.00000 -3.95269 - 7.40150 10.3276 0.00000 1.00000 -10.3276 - 7.42000 16.4640 0.00000 1.00000 -16.4640 - 7.43850 21.3618 0.00000 1.00000 -21.3618 - 7.45700 24.1782 0.00000 1.00000 -24.1782 - 7.47550 24.4162 0.00000 1.00000 -24.4162 - 7.49400 22.0356 0.00000 1.00000 -22.0356 - 7.51250 17.4573 0.00000 1.00000 -17.4573 - 7.53100 11.4623 0.00000 1.00000 -11.4623 - 7.54950 5.01118 0.00000 1.00000 -5.01118 - 7.56800 -0.965076 0.00000 1.00000 0.965076 - 7.58650 -5.75153 0.00000 1.00000 5.75153 - 7.60500 -8.96799 0.00000 1.00000 8.96799 - 7.62350 -10.5969 0.00000 1.00000 10.5969 - 7.64200 -10.9206 0.00000 1.00000 10.9206 - 7.66050 -10.3893 0.00000 1.00000 10.3893 - 7.67900 -9.46200 0.00000 1.00000 9.46200 - 7.69750 -8.46444 0.00000 1.00000 8.46444 - 7.71600 -7.50854 0.00000 1.00000 7.50854 - 7.73450 -6.49304 0.00000 1.00000 6.49304 - 7.75300 -5.18168 0.00000 1.00000 5.18168 - 7.77150 -3.32911 0.00000 1.00000 3.32911 - 7.79000 -0.811546 0.00000 1.00000 0.811546 - 7.80850 2.28073 0.00000 1.00000 -2.28073 - 7.82700 5.61902 0.00000 1.00000 -5.61902 - 7.84550 8.68909 0.00000 1.00000 -8.68909 - 7.86400 10.9073 0.00000 1.00000 -10.9073 - 7.88250 11.7676 0.00000 1.00000 -11.7676 - 7.90100 10.9777 0.00000 1.00000 -10.9777 - 7.91950 8.54633 0.00000 1.00000 -8.54633 - 7.93800 4.79627 0.00000 1.00000 -4.79627 - 7.95650 0.300695 0.00000 1.00000 -0.300695 - 7.97500 -4.24152 0.00000 1.00000 4.24152 - 7.99350 -8.15787 0.00000 1.00000 8.15787 - 8.01200 -10.9420 0.00000 1.00000 10.9420 - 8.03050 -12.3456 0.00000 1.00000 12.3456 - 8.04900 -12.4001 0.00000 1.00000 12.4001 - 8.06750 -11.3663 0.00000 1.00000 11.3663 - 8.08600 -9.63181 0.00000 1.00000 9.63181 - 8.10450 -7.58723 0.00000 1.00000 7.58723 - 8.12300 -5.52117 0.00000 1.00000 5.52117 - 8.14150 -3.56353 0.00000 1.00000 3.56353 - 8.16000 -1.69260 0.00000 1.00000 1.69260 - 8.17850 0.199827 0.00000 1.00000 -0.199827 - 8.19700 2.21044 0.00000 1.00000 -2.21044 - 8.21550 4.33057 0.00000 1.00000 -4.33057 - 8.23400 6.39218 0.00000 1.00000 -6.39218 - 8.25250 8.07555 0.00000 1.00000 -8.07555 - 8.27100 8.97896 0.00000 1.00000 -8.97896 - 8.28950 8.73073 0.00000 1.00000 -8.73073 - 8.30800 7.11016 0.00000 1.00000 -7.11016 - 8.32650 4.14151 0.00000 1.00000 -4.14151 - 8.34500 0.130936 0.00000 1.00000 -0.130936 - 8.36350 -4.36837 0.00000 1.00000 4.36837 - 8.38200 -8.65854 0.00000 1.00000 8.65854 - 8.40050 -12.0433 0.00000 1.00000 12.0433 - 8.41900 -13.9807 0.00000 1.00000 13.9807 - 8.43750 -14.2030 0.00000 1.00000 14.2030 - 8.45600 -12.7704 0.00000 1.00000 12.7704 - 8.47450 -10.0445 0.00000 1.00000 10.0445 - 8.49300 -6.58938 0.00000 1.00000 6.58938 - 8.51150 -3.02663 0.00000 1.00000 3.02663 - 8.53000 0.112114 0.00000 1.00000 -0.112114 - 8.54850 2.49566 0.00000 1.00000 -2.49566 - 8.56700 4.03580 0.00000 1.00000 -4.03580 - 8.58550 4.85377 0.00000 1.00000 -4.85377 - 8.60400 5.18537 0.00000 1.00000 -5.18537 - 8.62250 5.25808 0.00000 1.00000 -5.25808 - 8.64100 5.18193 0.00000 1.00000 -5.18193 - 8.65950 4.89182 0.00000 1.00000 -4.89182 - 8.67800 4.16349 0.00000 1.00000 -4.16349 - 8.69650 2.70252 0.00000 1.00000 -2.70252 - 8.71500 0.282220 0.00000 1.00000 -0.282220 - 8.73350 -3.11124 0.00000 1.00000 3.11124 - 8.75200 -7.17490 0.00000 1.00000 7.17490 - 8.77050 -11.2672 0.00000 1.00000 11.2672 - 8.78900 -14.4886 0.00000 1.00000 14.4886 - 8.80750 -15.8559 0.00000 1.00000 15.8559 - 8.82600 -14.5328 0.00000 1.00000 14.5328 - 8.84450 -10.0609 0.00000 1.00000 10.0609 - 8.86300 -2.52773 0.00000 1.00000 2.52773 - 8.88150 7.37428 0.00000 1.00000 -7.37428 - 8.90000 18.4240 0.00000 1.00000 -18.4240 - 8.91850 29.0726 0.00000 1.00000 -29.0726 - 8.93700 37.7295 0.00000 1.00000 -37.7295 - 8.95550 43.0717 0.00000 1.00000 -43.0717 - 8.97400 44.3044 0.00000 1.00000 -44.3044 - 8.99250 41.3154 0.00000 1.00000 -41.3154 - 9.01100 34.6857 0.00000 1.00000 -34.6857 - 9.02950 25.5570 0.00000 1.00000 -25.5570 - 9.04800 15.3859 0.00000 1.00000 -15.3859 - 9.06650 5.64529 0.00000 1.00000 -5.64529 - 9.08500 -2.45985 0.00000 1.00000 2.45985 - 9.10350 -8.19758 0.00000 1.00000 8.19758 - 9.12200 -11.3936 0.00000 1.00000 11.3936 - 9.14050 -12.3840 0.00000 1.00000 12.3840 - 9.15900 -11.8591 0.00000 1.00000 11.8591 - 9.17750 -10.6446 0.00000 1.00000 10.6446 - 9.19600 -9.48212 0.00000 1.00000 9.48212 - 9.21450 -8.86286 0.00000 1.00000 8.86286 - 9.23300 -8.95166 0.00000 1.00000 8.95166 - 9.25150 -9.60978 0.00000 1.00000 9.60978 - 9.27000 -10.4985 0.00000 1.00000 10.4985 - 9.28850 -11.2264 0.00000 1.00000 11.2264 - 9.30700 -11.4956 0.00000 1.00000 11.4956 - 9.32550 -11.2056 0.00000 1.00000 11.2056 - 9.34400 -10.4851 0.00000 1.00000 10.4851 - 9.36250 -9.64367 0.00000 1.00000 9.64367 - 9.38100 -9.05839 0.00000 1.00000 9.05839 - 9.39950 -9.03059 0.00000 1.00000 9.03059 - 9.41800 -9.65891 0.00000 1.00000 9.65891 - 9.43650 -10.7695 0.00000 1.00000 10.7695 - 9.45500 -11.9282 0.00000 1.00000 11.9282 - 9.47350 -12.5352 0.00000 1.00000 12.5352 - 9.49200 -11.9793 0.00000 1.00000 11.9793 - 9.51050 -9.80968 0.00000 1.00000 9.80968 - 9.52900 -5.88098 0.00000 1.00000 5.88098 - 9.54750 -0.429865 0.00000 1.00000 0.429865 - 9.56600 5.93738 0.00000 1.00000 -5.93738 - 9.58450 12.3467 0.00000 1.00000 -12.3467 - 9.60300 17.8253 0.00000 1.00000 -17.8253 - 9.62150 21.4983 0.00000 1.00000 -21.4983 - 9.64000 22.7684 0.00000 1.00000 -22.7684 - 9.65850 21.4353 0.00000 1.00000 -21.4353 - 9.67700 17.7297 0.00000 1.00000 -17.7297 - 9.69550 12.2556 0.00000 1.00000 -12.2556 - 9.71400 5.85940 0.00000 1.00000 -5.85940 - 9.73250 -0.539853 0.00000 1.00000 0.539853 - 9.75100 -6.11696 0.00000 1.00000 6.11696 - 9.76950 -10.2704 0.00000 1.00000 10.2704 - 9.78800 -12.6954 0.00000 1.00000 12.6954 - 9.80650 -13.3941 0.00000 1.00000 13.3941 - 9.82500 -12.6315 0.00000 1.00000 12.6315 - 9.84350 -10.8487 0.00000 1.00000 10.8487 - 9.86200 -8.55755 0.00000 1.00000 8.55755 - 9.88050 -6.24003 0.00000 1.00000 6.24003 - 9.89900 -4.27478 0.00000 1.00000 4.27478 - 9.91750 -2.90328 0.00000 1.00000 2.90328 - 9.93600 -2.23386 0.00000 1.00000 2.23386 - 9.95450 -2.27104 0.00000 1.00000 2.27104 - 9.97300 -2.95175 0.00000 1.00000 2.95175 - 9.99150 -4.17209 0.00000 1.00000 4.17209 - 10.0100 -5.79607 0.00000 1.00000 5.79607 - 10.0285 -7.64859 0.00000 1.00000 7.64859 - 10.0470 -9.50283 0.00000 1.00000 9.50283 - 10.0655 -11.0757 0.00000 1.00000 11.0757 - 10.0840 -12.0425 0.00000 1.00000 12.0425 - 10.1025 -12.0751 0.00000 1.00000 12.0751 - 10.1210 -10.9017 0.00000 1.00000 10.9017 - 10.1395 -8.37613 0.00000 1.00000 8.37613 - 10.1580 -4.54026 0.00000 1.00000 4.54026 - 10.1765 0.338357 0.00000 1.00000 -0.338357 - 10.1950 5.76996 0.00000 1.00000 -5.76996 - 10.2135 11.0939 0.00000 1.00000 -11.0939 - 10.2320 15.5741 0.00000 1.00000 -15.5741 - 10.2505 18.5225 0.00000 1.00000 -18.5225 - 10.2690 19.4270 0.00000 1.00000 -19.4270 - 10.2875 18.0567 0.00000 1.00000 -18.0567 - 10.3060 14.5227 0.00000 1.00000 -14.5227 - 10.3245 9.27796 0.00000 1.00000 -9.27796 - 10.3430 3.05599 0.00000 1.00000 -3.05599 - 10.3615 -3.24345 0.00000 1.00000 3.24345 - 10.3800 -8.70145 0.00000 1.00000 8.70145 - 10.3985 -12.5330 0.00000 1.00000 12.5330 - 10.4170 -14.2182 0.00000 1.00000 14.2182 - 10.4355 -13.5885 0.00000 1.00000 13.5885 - 10.4540 -10.8525 0.00000 1.00000 10.8525 - 10.4725 -6.55772 0.00000 1.00000 6.55772 - 10.4910 -1.49640 0.00000 1.00000 1.49640 - 10.5095 3.42852 0.00000 1.00000 -3.42852 - 10.5280 7.35363 0.00000 1.00000 -7.35363 - 10.5465 9.59717 0.00000 1.00000 -9.59717 - 10.5650 9.77054 0.00000 1.00000 -9.77054 - 10.5835 7.84234 0.00000 1.00000 -7.84234 - 10.6020 4.14584 0.00000 1.00000 -4.14584 - 10.6205 -0.671143 0.00000 1.00000 0.671143 - 10.6390 -5.74603 0.00000 1.00000 5.74603 - 10.6575 -10.1361 0.00000 1.00000 10.1361 - 10.6760 -12.9671 0.00000 1.00000 12.9671 - 10.6945 -13.5738 0.00000 1.00000 13.5738 - 10.7130 -11.6108 0.00000 1.00000 11.6108 - 10.7315 -7.11852 0.00000 1.00000 7.11852 - 10.7500 -0.532582 0.00000 1.00000 0.532582 - 10.7685 7.36496 0.00000 1.00000 -7.36496 - 10.7870 15.5502 0.00000 1.00000 -15.5502 - 10.8055 22.9046 0.00000 1.00000 -22.9046 - 10.8240 28.3836 0.00000 1.00000 -28.3836 - 10.8425 31.1819 0.00000 1.00000 -31.1819 - 10.8610 30.8667 0.00000 1.00000 -30.8667 - 10.8795 27.4544 0.00000 1.00000 -27.4544 - 10.8980 21.4174 0.00000 1.00000 -21.4174 - 10.9165 13.6149 0.00000 1.00000 -13.6149 - 10.9350 5.15717 0.00000 1.00000 -5.15717 - 10.9535 -2.77403 0.00000 1.00000 2.77403 - 10.9720 -9.11963 0.00000 1.00000 9.11963 - 10.9905 -13.1166 0.00000 1.00000 13.1166 - 11.0090 -14.4189 0.00000 1.00000 14.4189 - 11.0275 -13.1446 0.00000 1.00000 13.1446 - 11.0460 -9.84069 0.00000 1.00000 9.84069 - 11.0645 -5.37361 0.00000 1.00000 5.37361 - 11.0830 -0.766336 0.00000 1.00000 0.766336 - 11.1015 2.99059 0.00000 1.00000 -2.99059 - 11.1200 5.12102 0.00000 1.00000 -5.12102 - 11.1385 5.20555 0.00000 1.00000 -5.20555 - 11.1570 3.25580 0.00000 1.00000 -3.25580 - 11.1755 -0.295787 0.00000 1.00000 0.295787 - 11.1940 -4.68917 0.00000 1.00000 4.68917 - 11.2125 -8.99252 0.00000 1.00000 8.99252 - 11.2310 -12.2872 0.00000 1.00000 12.2872 - 11.2495 -13.8447 0.00000 1.00000 13.8447 - 11.2680 -13.2610 0.00000 1.00000 13.2610 - 11.2865 -10.5280 0.00000 1.00000 10.5280 - 11.3050 -6.02790 0.00000 1.00000 6.02790 - 11.3235 -0.457428 0.00000 1.00000 0.457428 - 11.3420 5.30272 0.00000 1.00000 -5.30272 - 11.3605 10.3468 0.00000 1.00000 -10.3468 - 11.3790 13.9003 0.00000 1.00000 -13.9003 - 11.3975 15.4459 0.00000 1.00000 -15.4459 - 11.4160 14.7993 0.00000 1.00000 -14.7993 - 11.4345 12.1251 0.00000 1.00000 -12.1251 - 11.4530 7.89515 0.00000 1.00000 -7.89515 - 11.4715 2.79743 0.00000 1.00000 -2.79743 - 11.4900 -2.38402 0.00000 1.00000 2.38402 - 11.5085 -6.89848 0.00000 1.00000 6.89848 - 11.5270 -10.1446 0.00000 1.00000 10.1446 - 11.5455 -11.7562 0.00000 1.00000 11.7562 - 11.5640 -11.6477 0.00000 1.00000 11.6477 - 11.5825 -10.0156 0.00000 1.00000 10.0156 - 11.6010 -7.29778 0.00000 1.00000 7.29778 - 11.6195 -4.09885 0.00000 1.00000 4.09885 - 11.6380 -1.08810 0.00000 1.00000 1.08810 - 11.6565 1.11439 0.00000 1.00000 -1.11439 - 11.6750 2.04788 0.00000 1.00000 -2.04788 - 11.6935 1.49867 0.00000 1.00000 -1.49867 - 11.7120 -0.451611 0.00000 1.00000 0.451611 - 11.7305 -3.42848 0.00000 1.00000 3.42848 - 11.7490 -6.82125 0.00000 1.00000 6.82125 - 11.7675 -9.88740 0.00000 1.00000 9.88740 - 11.7860 -11.8896 0.00000 1.00000 11.8896 - 11.8045 -12.2430 0.00000 1.00000 12.2430 - 11.8230 -10.6446 0.00000 1.00000 10.6446 - 11.8415 -7.15722 0.00000 1.00000 7.15722 - 11.8600 -2.22583 0.00000 1.00000 2.22583 - 11.8785 3.38458 0.00000 1.00000 -3.38458 - 11.8970 8.72108 0.00000 1.00000 -8.72108 - 11.9155 12.8213 0.00000 1.00000 -12.8213 - 11.9340 14.9032 0.00000 1.00000 -14.9032 - 11.9525 14.5281 0.00000 1.00000 -14.5281 - 11.9710 11.6999 0.00000 1.00000 -11.6999 - 11.9895 6.87776 0.00000 1.00000 -6.87776 - 12.0080 0.891504 0.00000 1.00000 -0.891504 - 12.0265 -5.22565 0.00000 1.00000 5.22565 - 12.0450 -10.4522 0.00000 1.00000 10.4522 - 12.0635 -13.9931 0.00000 1.00000 13.9931 - 12.0820 -15.4435 0.00000 1.00000 15.4435 - 12.1005 -14.8644 0.00000 1.00000 14.8644 - 12.1190 -12.7520 0.00000 1.00000 12.7520 - 12.1375 -9.90845 0.00000 1.00000 9.90845 - 12.1560 -7.24453 0.00000 1.00000 7.24453 - 12.1745 -5.56166 0.00000 1.00000 5.56166 - 12.1930 -5.36161 0.00000 1.00000 5.36161 - 12.2115 -6.72586 0.00000 1.00000 6.72586 - 12.2300 -9.28835 0.00000 1.00000 9.28835 - 12.2485 -12.3067 0.00000 1.00000 12.3067 - 12.2670 -14.8178 0.00000 1.00000 14.8178 - 12.2855 -15.8476 0.00000 1.00000 15.8476 - 12.3040 -14.6332 0.00000 1.00000 14.6332 - 12.3225 -10.8097 0.00000 1.00000 10.8097 - 12.3410 -4.52145 0.00000 1.00000 4.52145 - 12.3595 3.57058 0.00000 1.00000 -3.57058 - 12.3780 12.3893 0.00000 1.00000 -12.3893 - 12.3965 20.6314 0.00000 1.00000 -20.6314 - 12.4150 27.0092 0.00000 1.00000 -27.0092 - 12.4335 30.4959 0.00000 1.00000 -30.4959 - 12.4520 30.5247 0.00000 1.00000 -30.5247 - 12.4705 27.1034 0.00000 1.00000 -27.1034 - 12.4890 20.8197 0.00000 1.00000 -20.8197 - 12.5075 12.7348 0.00000 1.00000 -12.7348 - 12.5260 4.18409 0.00000 1.00000 -4.18409 - 12.5445 -3.47600 0.00000 1.00000 3.47600 - 12.5630 -9.12640 0.00000 1.00000 9.12640 - 12.5815 -12.0958 0.00000 1.00000 12.0958 - 12.6000 -12.2803 0.00000 1.00000 12.2803 - 12.6185 -10.1467 0.00000 1.00000 10.1467 - 12.6370 -6.61573 0.00000 1.00000 6.61573 - 12.6555 -2.84816 0.00000 1.00000 2.84816 - 12.6740 0.0234471 0.00000 1.00000 -0.0234471 - 12.6925 1.16051 0.00000 1.00000 -1.16051 - 12.7110 0.222329 0.00000 1.00000 -0.222329 - 12.7295 -2.53923 0.00000 1.00000 2.53923 - 12.7480 -6.31966 0.00000 1.00000 6.31966 - 12.7665 -9.93250 0.00000 1.00000 9.93250 - 12.7850 -12.0782 0.00000 1.00000 12.0782 - 12.8035 -11.6556 0.00000 1.00000 11.6556 - 12.8220 -8.04822 0.00000 1.00000 8.04822 - 12.8405 -1.31753 0.00000 1.00000 1.31753 - 12.8590 7.74657 0.00000 1.00000 -7.74657 - 12.8775 17.7420 0.00000 1.00000 -17.7420 - 12.8960 26.9214 0.00000 1.00000 -26.9214 - 12.9145 33.5578 0.00000 1.00000 -33.5578 - 12.9330 36.3277 0.00000 1.00000 -36.3277 - 12.9515 34.6234 0.00000 1.00000 -34.6234 - 12.9700 28.7156 0.00000 1.00000 -28.7156 - 12.9885 19.7233 0.00000 1.00000 -19.7233 - 13.0070 9.38804 0.00000 1.00000 -9.38804 - 13.0255 -0.297908 0.00000 1.00000 0.297908 - 13.0440 -7.52791 0.00000 1.00000 7.52791 - 13.0625 -11.0794 0.00000 1.00000 11.0794 - 13.0810 -10.5807 0.00000 1.00000 10.5807 - 13.0995 -6.58087 0.00000 1.00000 6.58087 - 13.1180 -0.404585 0.00000 1.00000 0.404585 - 13.1365 6.17556 0.00000 1.00000 -6.17556 - 13.1550 11.3708 0.00000 1.00000 -11.3708 - 13.1735 13.8053 0.00000 1.00000 -13.8053 - 13.1920 12.8357 0.00000 1.00000 -12.8357 - 13.2105 8.68336 0.00000 1.00000 -8.68336 - 13.2290 2.34908 0.00000 1.00000 -2.34908 - 13.2475 -4.66287 0.00000 1.00000 4.66287 - 13.2660 -10.7379 0.00000 1.00000 10.7379 - 13.2845 -14.5602 0.00000 1.00000 14.5602 - 13.3030 -15.4343 0.00000 1.00000 15.4343 - 13.3215 -13.4393 0.00000 1.00000 13.4393 - 13.3400 -9.37967 0.00000 1.00000 9.37967 - 13.3585 -4.55053 0.00000 1.00000 4.55053 - 13.3770 -0.382431 0.00000 1.00000 0.382431 - 13.3955 1.93839 0.00000 1.00000 -1.93839 - 13.4140 1.77366 0.00000 1.00000 -1.77366 - 13.4325 -0.818874 0.00000 1.00000 0.818874 - 13.4510 -5.13072 0.00000 1.00000 5.13072 - 13.4695 -10.0255 0.00000 1.00000 10.0255 - 13.4880 -14.2744 0.00000 1.00000 14.2744 - 13.5065 -16.9060 0.00000 1.00000 16.9060 - 13.5250 -17.4714 0.00000 1.00000 17.4714 - 13.5435 -16.1512 0.00000 1.00000 16.1512 - 13.5620 -13.6784 0.00000 1.00000 13.6784 - 13.5805 -11.1043 0.00000 1.00000 11.1043 - 13.5990 -9.47288 0.00000 1.00000 9.47288 - 13.6175 -9.49567 0.00000 1.00000 9.49567 - 13.6360 -11.3153 0.00000 1.00000 11.3153 - 13.6545 -14.4268 0.00000 1.00000 14.4268 - 13.6730 -17.7824 0.00000 1.00000 17.7824 - 13.6915 -20.0552 0.00000 1.00000 20.0552 - 13.7100 -19.9965 0.00000 1.00000 19.9965 - 13.7285 -16.7898 0.00000 1.00000 16.7898 - 13.7470 -10.3089 0.00000 1.00000 10.3089 - 13.7655 -1.20781 0.00000 1.00000 1.20781 - 13.7840 9.18567 0.00000 1.00000 -9.18567 - 13.8025 19.1488 0.00000 1.00000 -19.1488 - 13.8210 26.9489 0.00000 1.00000 -26.9489 - 13.8395 31.2366 0.00000 1.00000 -31.2366 - 13.8580 31.3496 0.00000 1.00000 -31.3496 - 13.8765 27.4511 0.00000 1.00000 -27.4511 - 13.8950 20.4697 0.00000 1.00000 -20.4697 - 13.9135 11.8582 0.00000 1.00000 -11.8582 - 13.9320 3.23523 0.00000 1.00000 -3.23523 - 13.9505 -3.99882 0.00000 1.00000 3.99882 - 13.9690 -8.96984 0.00000 1.00000 8.96984 - 13.9875 -11.4848 0.00000 1.00000 11.4848 - 14.0060 -11.9967 0.00000 1.00000 11.9967 - 14.0245 -11.3970 0.00000 1.00000 11.3970 - 14.0430 -10.7008 0.00000 1.00000 10.7008 - 14.0615 -10.7168 0.00000 1.00000 10.7168 - 14.0800 -11.7936 0.00000 1.00000 11.7936 - 14.0985 -13.7115 0.00000 1.00000 13.7115 - 14.1170 -15.7457 0.00000 1.00000 15.7457 - 14.1355 -16.8835 0.00000 1.00000 16.8835 - 14.1540 -16.1342 0.00000 1.00000 16.1342 - 14.1725 -12.8466 0.00000 1.00000 12.8466 - 14.1910 -6.94542 0.00000 1.00000 6.94542 - 14.2095 0.982134 0.00000 1.00000 -0.982134 - 14.2280 9.77953 0.00000 1.00000 -9.77953 - 14.2465 17.9729 0.00000 1.00000 -17.9729 - 14.2650 24.1178 0.00000 1.00000 -24.1178 - 14.2835 27.1485 0.00000 1.00000 -27.1485 - 14.3020 26.6355 0.00000 1.00000 -26.6355 - 14.3205 22.8839 0.00000 1.00000 -22.8839 - 14.3390 16.8479 0.00000 1.00000 -16.8479 - 14.3575 9.88786 0.00000 1.00000 -9.88786 - 14.3760 3.43554 0.00000 1.00000 -3.43554 - 14.3945 -1.34253 0.00000 1.00000 1.34253 - 14.4130 -3.79922 0.00000 1.00000 3.79922 - 14.4315 -3.91650 0.00000 1.00000 3.91650 - 14.4500 -2.25034 0.00000 1.00000 2.25034 - 14.4685 0.265934 0.00000 1.00000 -0.265934 - 14.4870 2.60091 0.00000 1.00000 -2.60091 - 14.5055 3.90902 0.00000 1.00000 -3.90902 - 14.5240 3.74411 0.00000 1.00000 -3.74411 - 14.5425 2.15013 0.00000 1.00000 -2.15013 - 14.5610 -0.388481 0.00000 1.00000 0.388481 - 14.5795 -3.11515 0.00000 1.00000 3.11515 - 14.5980 -5.23631 0.00000 1.00000 5.23631 - 14.6165 -6.15513 0.00000 1.00000 6.15513 - 14.6350 -5.63898 0.00000 1.00000 5.63898 - 14.6535 -3.87566 0.00000 1.00000 3.87566 - 14.6720 -1.40645 0.00000 1.00000 1.40645 - 14.6905 1.04029 0.00000 1.00000 -1.04029 - 14.7090 2.76304 0.00000 1.00000 -2.76304 - 14.7275 3.28473 0.00000 1.00000 -3.28473 - 14.7460 2.47788 0.00000 1.00000 -2.47788 - 14.7645 0.584519 0.00000 1.00000 -0.584519 - 14.7830 -1.87052 0.00000 1.00000 1.87052 - 14.8015 -4.24417 0.00000 1.00000 4.24417 - 14.8200 -5.96765 0.00000 1.00000 5.96765 - 14.8385 -6.70965 0.00000 1.00000 6.70965 - 14.8570 -6.46211 0.00000 1.00000 6.46211 - 14.8755 -5.52356 0.00000 1.00000 5.52356 - 14.8940 -4.38544 0.00000 1.00000 4.38544 - 14.9125 -3.55512 0.00000 1.00000 3.55512 - 14.9310 -3.36898 0.00000 1.00000 3.36898 - 14.9495 -3.85281 0.00000 1.00000 3.85281 - 14.9680 -4.67590 0.00000 1.00000 4.67590 - 14.9865 -5.21922 0.00000 1.00000 5.21922 - 15.0050 -4.74479 0.00000 1.00000 4.74479 - 15.0235 -2.62144 0.00000 1.00000 2.62144 - 15.0420 1.45687 0.00000 1.00000 -1.45687 - 15.0605 7.32500 0.00000 1.00000 -7.32500 - 15.0790 14.3193 0.00000 1.00000 -14.3193 - 15.0975 21.3835 0.00000 1.00000 -21.3835 - 15.1160 27.2852 0.00000 1.00000 -27.2852 - 15.1345 30.8902 0.00000 1.00000 -30.8902 - 15.1530 31.4245 0.00000 1.00000 -31.4245 - 15.1715 28.6588 0.00000 1.00000 -28.6588 - 15.1900 22.9682 0.00000 1.00000 -22.9682 - 15.2085 15.2541 0.00000 1.00000 -15.2541 - 15.2270 6.74712 0.00000 1.00000 -6.74712 - 15.2455 -1.25964 0.00000 1.00000 1.25964 - 15.2640 -7.68049 0.00000 1.00000 7.68049 - 15.2825 -11.8442 0.00000 1.00000 11.8442 - 15.3010 -13.5919 0.00000 1.00000 13.5919 - 15.3195 -13.2493 0.00000 1.00000 13.2493 - 15.3380 -11.4916 0.00000 1.00000 11.4916 - 15.3565 -9.14144 0.00000 1.00000 9.14144 - 15.3750 -6.95504 0.00000 1.00000 6.95504 - 15.3935 -5.44896 0.00000 1.00000 5.44896 - 15.4120 -4.80772 0.00000 1.00000 4.80772 - 15.4305 -4.88897 0.00000 1.00000 4.88897 - 15.4490 -5.31706 0.00000 1.00000 5.31706 - 15.4675 -5.63285 0.00000 1.00000 5.63285 - 15.4860 -5.45462 0.00000 1.00000 5.45462 - 15.5045 -4.60459 0.00000 1.00000 4.60459 - 15.5230 -3.16776 0.00000 1.00000 3.16776 - 15.5415 -1.46992 0.00000 1.00000 1.46992 - 15.5600 0.0157586 0.00000 1.00000 -0.0157586 - 15.5785 0.806047 0.00000 1.00000 -0.806047 - 15.5970 0.550242 0.00000 1.00000 -0.550242 - 15.6155 -0.861348 0.00000 1.00000 0.861348 - 15.6340 -3.25430 0.00000 1.00000 3.25430 - 15.6525 -6.20584 0.00000 1.00000 6.20584 - 15.6710 -9.14992 0.00000 1.00000 9.14992 - 15.6895 -11.5204 0.00000 1.00000 11.5204 - 15.7080 -12.8909 0.00000 1.00000 12.8909 - 15.7265 -13.0717 0.00000 1.00000 13.0717 - 15.7450 -12.1417 0.00000 1.00000 12.1417 - 15.7635 -10.4097 0.00000 1.00000 10.4097 - 15.7820 -8.32011 0.00000 1.00000 8.32011 - 15.8005 -6.33136 0.00000 1.00000 6.33136 - 15.8190 -4.80087 0.00000 1.00000 4.80087 - 15.8375 -3.90675 0.00000 1.00000 3.90675 - 15.8560 -3.62474 0.00000 1.00000 3.62474 - 15.8745 -3.76225 0.00000 1.00000 3.76225 - 15.8930 -4.03596 0.00000 1.00000 4.03596 - 15.9115 -4.16761 0.00000 1.00000 4.16761 - 15.9300 -3.96959 0.00000 1.00000 3.96959 - 15.9485 -3.39629 0.00000 1.00000 3.39629 - 15.9670 -2.54969 0.00000 1.00000 2.54969 - 15.9855 -1.64188 0.00000 1.00000 1.64188 - 16.0040 -0.928772 0.00000 1.00000 0.928772 - 16.0225 -0.634845 0.00000 1.00000 0.634845 - 16.0410 -0.888145 0.00000 1.00000 0.888145 - 16.0595 -1.67980 0.00000 1.00000 1.67980 - 16.0780 -2.85514 0.00000 1.00000 2.85514 - 16.0965 -4.13661 0.00000 1.00000 4.13661 - 16.1150 -5.17310 0.00000 1.00000 5.17310 - 16.1335 -5.60636 0.00000 1.00000 5.60636 - 16.1520 -5.14159 0.00000 1.00000 5.14159 - 16.1705 -3.60734 0.00000 1.00000 3.60734 - 16.1890 -0.992023 0.00000 1.00000 0.992023 - 16.2075 2.54958 0.00000 1.00000 -2.54958 - 16.2260 6.71807 0.00000 1.00000 -6.71807 - 16.2445 11.1120 0.00000 1.00000 -11.1120 - 16.2630 15.2812 0.00000 1.00000 -15.2812 - 16.2815 18.7822 0.00000 1.00000 -18.7822 - 16.3000 21.2269 0.00000 1.00000 -21.2269 - 16.3185 22.3212 0.00000 1.00000 -22.3212 - 16.3370 21.8912 0.00000 1.00000 -21.8912 - 16.3555 19.8991 0.00000 1.00000 -19.8991 - 16.3740 16.4493 0.00000 1.00000 -16.4493 - 16.3925 11.7863 0.00000 1.00000 -11.7863 - 16.4110 6.28331 0.00000 1.00000 -6.28331 - 16.4295 0.418687 0.00000 1.00000 -0.418687 - 16.4480 -5.25963 0.00000 1.00000 5.25963 - 16.4665 -10.1842 0.00000 1.00000 10.1842 - 16.4850 -13.8295 0.00000 1.00000 13.8295 - 16.5035 -15.7785 0.00000 1.00000 15.7785 - 16.5220 -15.7830 0.00000 1.00000 15.7830 - 16.5405 -13.8070 0.00000 1.00000 13.8070 - 16.5590 -10.0391 0.00000 1.00000 10.0391 - 16.5775 -4.87264 0.00000 1.00000 4.87264 - 16.5960 1.14589 0.00000 1.00000 -1.14589 - 16.6145 7.38649 0.00000 1.00000 -7.38649 - 16.6330 13.2091 0.00000 1.00000 -13.2091 - 16.6515 18.0296 0.00000 1.00000 -18.0296 - 16.6700 21.3708 0.00000 1.00000 -21.3708 - 16.6885 22.8991 0.00000 1.00000 -22.8991 - 16.7070 22.4456 0.00000 1.00000 -22.4456 - 16.7255 20.0158 0.00000 1.00000 -20.0158 - 16.7440 15.7881 0.00000 1.00000 -15.7881 - 16.7625 10.1035 0.00000 1.00000 -10.1035 - 16.7810 3.44424 0.00000 1.00000 -3.44424 - 16.7995 -3.59847 0.00000 1.00000 3.59847 - 16.8180 -10.3717 0.00000 1.00000 10.3717 - 16.8365 -16.2205 0.00000 1.00000 16.2205 - 16.8550 -20.5580 0.00000 1.00000 20.5580 - 16.8735 -22.9372 0.00000 1.00000 22.9372 - 16.8920 -23.1129 0.00000 1.00000 23.1129 - 16.9105 -21.0837 0.00000 1.00000 21.0837 - 16.9290 -17.1032 0.00000 1.00000 17.1032 - 16.9475 -11.6563 0.00000 1.00000 11.6563 - 16.9660 -5.39998 0.00000 1.00000 5.39998 - 16.9845 0.923758 0.00000 1.00000 -0.923758 - 17.0030 6.59122 0.00000 1.00000 -6.59122 - 17.0215 10.9979 0.00000 1.00000 -10.9979 - 17.0400 13.7383 0.00000 1.00000 -13.7383 - 17.0585 14.6477 0.00000 1.00000 -14.6477 - 17.0770 13.7998 0.00000 1.00000 -13.7998 - 17.0955 11.4638 0.00000 1.00000 -11.4638 - 17.1140 8.03578 0.00000 1.00000 -8.03578 - 17.1325 3.96378 0.00000 1.00000 -3.96378 - 17.1510 -0.316698 0.00000 1.00000 0.316698 - 17.1695 -4.42438 0.00000 1.00000 4.42438 - 17.1880 -8.04681 0.00000 1.00000 8.04681 - 17.2065 -10.9324 0.00000 1.00000 10.9324 - 17.2250 -12.8725 0.00000 1.00000 12.8725 - 17.2435 -13.6898 0.00000 1.00000 13.6898 - 17.2620 -13.2456 0.00000 1.00000 13.2456 - 17.2805 -11.4675 0.00000 1.00000 11.4675 - 17.2990 -8.39144 0.00000 1.00000 8.39144 - 17.3175 -4.20001 0.00000 1.00000 4.20001 - 17.3360 0.758004 0.00000 1.00000 -0.758004 - 17.3545 5.98116 0.00000 1.00000 -5.98116 - 17.3730 10.8661 0.00000 1.00000 -10.8661 - 17.3915 14.7906 0.00000 1.00000 -14.7906 - 17.4100 17.2137 0.00000 1.00000 -17.2137 - 17.4285 17.7745 0.00000 1.00000 -17.7745 - 17.4470 16.3661 0.00000 1.00000 -16.3661 - 17.4655 13.1690 0.00000 1.00000 -13.1690 - 17.4840 8.63053 0.00000 1.00000 -8.63053 - 17.5025 3.39246 0.00000 1.00000 -3.39246 - 17.5210 -1.82203 0.00000 1.00000 1.82203 - 17.5395 -6.33848 0.00000 1.00000 6.33848 - 17.5580 -9.64981 0.00000 1.00000 9.64981 - 17.5765 -11.4978 0.00000 1.00000 11.4978 - 17.5950 -11.9009 0.00000 1.00000 11.9009 - 17.6135 -11.1239 0.00000 1.00000 11.1239 - 17.6320 -9.59944 0.00000 1.00000 9.59944 - 17.6505 -7.81972 0.00000 1.00000 7.81972 - 17.6690 -6.22442 0.00000 1.00000 6.22442 - 17.6875 -5.11122 0.00000 1.00000 5.11122 - 17.7060 -4.58875 0.00000 1.00000 4.58875 - 17.7245 -4.58029 0.00000 1.00000 4.58029 - 17.7430 -4.87225 0.00000 1.00000 4.87225 - 17.7615 -5.18968 0.00000 1.00000 5.18968 - 17.7800 -5.27616 0.00000 1.00000 5.27616 - 17.7985 -4.95771 0.00000 1.00000 4.95771 - 17.8170 -4.17763 0.00000 1.00000 4.17763 - 17.8355 -2.99861 0.00000 1.00000 2.99861 - 17.8540 -1.57655 0.00000 1.00000 1.57655 - 17.8725 -0.115674 0.00000 1.00000 0.115674 - 17.8910 1.18232 0.00000 1.00000 -1.18232 - 17.9095 2.16253 0.00000 1.00000 -2.16253 - 17.9280 2.74507 0.00000 1.00000 -2.74507 - 17.9465 2.93310 0.00000 1.00000 -2.93310 - 17.9650 2.80225 0.00000 1.00000 -2.80225 - 17.9835 2.47685 0.00000 1.00000 -2.47685 - 18.0020 2.09940 0.00000 1.00000 -2.09940 - 18.0205 1.79907 0.00000 1.00000 -1.79907 - 18.0390 1.66403 0.00000 1.00000 -1.66403 - 18.0575 1.72260 0.00000 1.00000 -1.72260 - 18.0760 1.93703 0.00000 1.00000 -1.93703 - 18.0945 2.21113 0.00000 1.00000 -2.21113 - 18.1130 2.40837 0.00000 1.00000 -2.40837 - 18.1315 2.37442 0.00000 1.00000 -2.37442 - 18.1500 1.95988 0.00000 1.00000 -1.95988 - 18.1685 1.04724 0.00000 1.00000 -1.04724 - 18.1870 -0.426523 0.00000 1.00000 0.426523 - 18.2055 -2.45315 0.00000 1.00000 2.45315 - 18.2240 -4.90773 0.00000 1.00000 4.90773 - 18.2425 -7.52944 0.00000 1.00000 7.52944 - 18.2610 -9.92715 0.00000 1.00000 9.92715 - 18.2795 -11.6174 0.00000 1.00000 11.6174 - 18.2980 -12.0956 0.00000 1.00000 12.0956 - 18.3165 -10.9327 0.00000 1.00000 10.9327 - 18.3350 -7.88331 0.00000 1.00000 7.88331 - 18.3535 -2.98071 0.00000 1.00000 2.98071 - 18.3720 3.40650 0.00000 1.00000 -3.40650 - 18.3905 10.5811 0.00000 1.00000 -10.5811 - 18.4090 17.5968 0.00000 1.00000 -17.5968 - 18.4275 23.4036 0.00000 1.00000 -23.4036 - 18.4460 27.0310 0.00000 1.00000 -27.0310 - 18.4645 27.7731 0.00000 1.00000 -27.7731 - 18.4830 25.3345 0.00000 1.00000 -25.3345 - 18.5015 19.9052 0.00000 1.00000 -19.9052 - 18.5200 12.1472 0.00000 1.00000 -12.1472 - 18.5385 3.09099 0.00000 1.00000 -3.09099 - 18.5570 -6.03798 0.00000 1.00000 6.03798 - 18.5755 -14.0281 0.00000 1.00000 14.0281 - 18.5940 -19.8843 0.00000 1.00000 19.8843 - 18.6125 -22.9844 0.00000 1.00000 22.9844 - 18.6310 -23.1597 0.00000 1.00000 23.1597 - 18.6495 -20.6881 0.00000 1.00000 20.6881 - 18.6680 -16.2075 0.00000 1.00000 16.2075 - 18.6865 -10.5714 0.00000 1.00000 10.5714 - 18.7050 -4.68098 0.00000 1.00000 4.68098 - 18.7235 0.671251 0.00000 1.00000 -0.671251 - 18.7420 4.91529 0.00000 1.00000 -4.91529 - 18.7605 7.75797 0.00000 1.00000 -7.75797 - 18.7790 9.17588 0.00000 1.00000 -9.17588 - 18.7975 9.35965 0.00000 1.00000 -9.35965 - 18.8160 8.63035 0.00000 1.00000 -8.63035 - 18.8345 7.35145 0.00000 1.00000 -7.35145 - 18.8530 5.85510 0.00000 1.00000 -5.85510 - 18.8715 4.39513 0.00000 1.00000 -4.39513 - 18.8900 3.13002 0.00000 1.00000 -3.13002 - 18.9085 2.13168 0.00000 1.00000 -2.13168 - 18.9270 1.40976 0.00000 1.00000 -1.40976 - 18.9455 0.939913 0.00000 1.00000 -0.939913 - 18.9640 0.686429 0.00000 1.00000 -0.686429 - 18.9825 0.614229 0.00000 1.00000 -0.614229 - 19.0010 0.690570 0.00000 1.00000 -0.690570 - 19.0195 0.880032 0.00000 1.00000 -0.880032 - 19.0380 1.13788 0.00000 1.00000 -1.13788 - 19.0565 1.40627 0.00000 1.00000 -1.40627 - 19.0750 1.61604 0.00000 1.00000 -1.61604 - 19.0935 1.69418 0.00000 1.00000 -1.69418 - 19.1120 1.57467 0.00000 1.00000 -1.57467 - 19.1305 1.20912 0.00000 1.00000 -1.20912 - 19.1490 0.574418 0.00000 1.00000 -0.574418 - 19.1675 -0.322868 0.00000 1.00000 0.322868 - 19.1860 -1.44364 0.00000 1.00000 1.44364 - 19.2045 -2.71278 0.00000 1.00000 2.71278 - 19.2230 -4.01492 0.00000 1.00000 4.01492 - 19.2415 -5.19189 0.00000 1.00000 5.19189 - 19.2600 -6.04623 0.00000 1.00000 6.04623 - 19.2785 -6.35560 0.00000 1.00000 6.35560 - 19.2970 -5.90135 0.00000 1.00000 5.90135 - 19.3155 -4.51168 0.00000 1.00000 4.51168 - 19.3340 -2.11474 0.00000 1.00000 2.11474 - 19.3525 1.20914 0.00000 1.00000 -1.20914 - 19.3710 5.19105 0.00000 1.00000 -5.19105 - 19.3895 9.36912 0.00000 1.00000 -9.36912 - 19.4080 13.1271 0.00000 1.00000 -13.1271 - 19.4265 15.7779 0.00000 1.00000 -15.7779 - 19.4450 16.6827 0.00000 1.00000 -16.6827 - 19.4635 15.3867 0.00000 1.00000 -15.3867 - 19.4820 11.7418 0.00000 1.00000 -11.7418 - 19.5005 5.98757 0.00000 1.00000 -5.98757 - 19.5190 -1.23710 0.00000 1.00000 1.23710 - 19.5375 -8.96359 0.00000 1.00000 8.96359 - 19.5560 -16.0382 0.00000 1.00000 16.0382 - 19.5745 -21.3164 0.00000 1.00000 21.3164 - 19.5930 -23.8699 0.00000 1.00000 23.8699 - 19.6115 -23.1644 0.00000 1.00000 23.1644 - 19.6300 -19.1740 0.00000 1.00000 19.1740 - 19.6485 -12.4057 0.00000 1.00000 12.4057 - 19.6670 -3.82669 0.00000 1.00000 3.82669 - 19.6855 5.29471 0.00000 1.00000 -5.29471 - 19.7040 13.6058 0.00000 1.00000 -13.6058 - 19.7225 19.9014 0.00000 1.00000 -19.9014 - 19.7410 23.3260 0.00000 1.00000 -23.3260 - 19.7595 23.5068 0.00000 1.00000 -23.5068 - 19.7780 20.5929 0.00000 1.00000 -20.5929 - 19.7965 15.1973 0.00000 1.00000 -15.1973 - 19.8150 8.25741 0.00000 1.00000 -8.25741 - 19.8335 0.846490 0.00000 1.00000 -0.846490 - 19.8520 -6.02165 0.00000 1.00000 6.02165 - 19.8705 -11.5565 0.00000 1.00000 11.5565 - 19.8890 -15.2939 0.00000 1.00000 15.2939 - 19.9075 -17.1257 0.00000 1.00000 17.1257 - 19.9260 -17.2573 0.00000 1.00000 17.2573 - 19.9445 -16.1119 0.00000 1.00000 16.1119 - 19.9630 -14.2055 0.00000 1.00000 14.2055 - 19.9815 -12.0275 0.00000 1.00000 12.0275 - 20.0000 -9.95383 0.00000 1.00000 9.95383 diff --git a/tests/testdata/badNi.stru b/tests/testdata/badNi.stru deleted file mode 100644 index d0b980cb..00000000 --- a/tests/testdata/badNi.stru +++ /dev/null @@ -1,32 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/badNiZeroVolume.stru b/tests/testdata/badNiZeroVolume.stru deleted file mode 100644 index 089db0da..00000000 --- a/tests/testdata/badNiZeroVolume.stru +++ /dev/null @@ -1,33 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 0.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/noLattice.stru b/tests/testdata/noLattice.stru deleted file mode 100644 index 4f8e7212..00000000 --- a/tests/testdata/noLattice.stru +++ /dev/null @@ -1,32 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, -3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000